]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: fix incorrect i_size of global bitmap inode after resize
authorJoseph Qi <joseph.qi@huawei.com>
Wed, 4 Jun 2014 23:06:17 +0000 (16:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Jun 2014 23:53:54 +0000 (16:53 -0700)
commit4b849307d6def064f1a5473e82c8c057f6e9eaed
tree3be1bc2fe567f37c322bd1f4c1b5593e1b959bcc
parenta6538c4d0a4ba6e17efdb5c613a6b1af6f14945f
ocfs2: fix incorrect i_size of global bitmap inode after resize

Ocfs2 cluster size may be 1MB, which has 20 bits.  When resize, the
input new clusters is mostly the number of clusters in a group
descriptor(32256).

Since the input clusters is defined as type int, so it will overflow
when shift left 20 bits and then lead to incorrect global bitmap i_size.

Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/resize.c