ext2: avoid rec_len overflow with 64KB block size
authorJan Kara <jack@suse.cz>
Sun, 21 Oct 2007 23:41:40 +0000 (16:41 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 22 Oct 2007 15:13:18 +0000 (08:13 -0700)
commit89910cccb8fec0c1140d33a743e72a712efd4f05
tree8165b7cf7039d02b2276fbb3e2aba0e1df7a2ca8
parent321bcf92163038e2b96fd3bf9bc29f755c81d9ef
ext2: avoid rec_len overflow with 64KB block size

With 64KB blocksize, a directory entry can have size 64KB which does not
fit into 16 bits we have for entry length.  So we store 0xffff instead and
convert the value when read from / written to disk.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ext2/dir.c
include/linux/ext2_fs.h