diff options
| author | Alex Shi <alex.shi@linaro.org> | 2016-08-18 12:33:31 +0800 |
|---|---|---|
| committer | Alex Shi <alex.shi@linaro.org> | 2016-08-18 12:33:31 +0800 |
| commit | fdd85431d91c9da37e9e696eb8fe80f1a2dcdbeb (patch) | |
| tree | ac60b28ebed345df274ce42aa3c9f3ee091875d1 /fs/ext4/balloc.c | |
| parent | e01035c1a71d7cceebc3df92f79577df7438523a (diff) | |
| parent | e779279da78339ec75fa72571ef901a447762cc6 (diff) | |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Diffstat (limited to 'fs/ext4/balloc.c')
| -rw-r--r-- | fs/ext4/balloc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index fe1f50fe764f..f97110461c19 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c @@ -208,6 +208,9 @@ static int ext4_init_block_bitmap(struct super_block *sb, memset(bh->b_data, 0, sb->s_blocksize); bit_max = ext4_num_base_meta_clusters(sb, block_group); + if ((bit_max >> 3) >= bh->b_size) + return -EFSCORRUPTED; + for (bit = 0; bit < bit_max; bit++) ext4_set_bit(bit, bh->b_data); |
