diff options
author | Eric Sandeen <sandeen@redhat.com> | 2008-01-29 04:58:27 (GMT) |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-01-29 04:58:27 (GMT) |
commit | e2b4657453c0d5571bd3c7256585c486ed42d364 (patch) | |
tree | 5b8ab501cdf5fa7427ef32440ace56eac72e9ecf /fs/ext4/super.c | |
parent | 19295529db35381d46dbaf246f69b4e3b3393996 (diff) | |
download | linux-fsl-qoriq-e2b4657453c0d5571bd3c7256585c486ed42d364.tar.xz |
ext4: store maxbytes for bitmapped files and return EFBIG as appropriate
Calculate & store the max offset for bitmapped files, and
catch too-large seeks, truncates, and writes in ext4, shortening
or rejecting as appropriate.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index c79e46b..0931831 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1922,6 +1922,7 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) } } + sbi->s_bitmap_maxbytes = ext4_max_bitmap_size(sb->s_blocksize_bits); sb->s_maxbytes = ext4_max_size(sb->s_blocksize_bits); if (le32_to_cpu(es->s_rev_level) == EXT4_GOOD_OLD_REV) { |