diff options
author | 2007-10-21 16:41:40 -0700 | |
---|---|---|
committer | 2007-10-22 08:13:18 -0700 | |
commit | 89910cccb8fec0c1140d33a743e72a712efd4f05 (patch) | |
tree | 8165b7cf7039d02b2276fbb3e2aba0e1df7a2ca8 /include/linux/ext2_fs.h | |
parent | dcache: don't expose uninitialized memory in /proc/<pid>/fd/<fd> (diff) | |
download | linux-89910cccb8fec0c1140d33a743e72a712efd4f05.tar.gz linux-89910cccb8fec0c1140d33a743e72a712efd4f05.tar.bz2 linux-89910cccb8fec0c1140d33a743e72a712efd4f05.zip |
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>
Diffstat (limited to 'include/linux/ext2_fs.h')
-rw-r--r-- | include/linux/ext2_fs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h index c77c3bbfe4bb..0f6c86c634fd 100644 --- a/include/linux/ext2_fs.h +++ b/include/linux/ext2_fs.h @@ -561,6 +561,7 @@ enum { #define EXT2_DIR_ROUND (EXT2_DIR_PAD - 1) #define EXT2_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT2_DIR_ROUND) & \ ~EXT2_DIR_ROUND) +#define EXT2_MAX_REC_LEN ((1<<16)-1) static inline ext2_fsblk_t ext2_group_first_block_no(struct super_block *sb, unsigned long group_no) |