summaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
authorJoseph Qi2015-12-29 23:54:06 +0100
committerLinus Torvalds2015-12-30 02:45:49 +0100
commit5c9ee4cbf2a945271f25b89b137f2c03bbc3be33 (patch)
tree19ba4dcdb5ec895f8f0a45d24481910376068d4c /mm/memcontrol.c
parentMerge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert... (diff)
downloadkernel-qcow2-linux-5c9ee4cbf2a945271f25b89b137f2c03bbc3be33.tar.gz
kernel-qcow2-linux-5c9ee4cbf2a945271f25b89b137f2c03bbc3be33.tar.xz
kernel-qcow2-linux-5c9ee4cbf2a945271f25b89b137f2c03bbc3be33.zip
ocfs2: fix BUG when calculate new backup super
When resizing, it firstly extends the last gd. Once it should backup super in the gd, it calculates new backup super and update the corresponding value. But it currently doesn't consider the situation that the backup super is already done. And in this case, it still sets the bit in gd bitmap and then decrease from bg_free_bits_count, which leads to a corrupted gd and trigger the BUG in ocfs2_block_group_set_bits: BUG_ON(le16_to_cpu(bg->bg_free_bits_count) < num_bits); So check whether the backup super is done and then do the updates. Signed-off-by: Joseph Qi <joseph.qi@huawei.com> Reviewed-by: Jiufei Xue <xuejiufei@huawei.com> Reviewed-by: Yiwen Jiang <jiangyiwen@huawei.com> Cc: Mark Fasheh <mfasheh@suse.de> Cc: Joel Becker <jlbec@evilplan.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memcontrol.c')
0 files changed, 0 insertions, 0 deletions