f2fs: fix potential corruption in area before F2FS_SUPER_OFFSET
authorSheng Yong <shengyong1@huawei.com>
Mon, 29 Jan 2018 11:13:15 +0000 (19:13 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 12 Mar 2018 23:05:29 +0000 (08:05 +0900)
commit0964fc1a82a310c2effb6722446b9cc86db55aa3
treeff444adcacd5e5917e2668a563a18f336663b96e
parentbdbc90fa55af632f8a883a3d93c54a08708ed80a
f2fs: fix potential corruption in area before F2FS_SUPER_OFFSET

sb_getblk does not guarantee the buffer head is uptodate. If bh is not
uptodate, the data (may be used as boot code) in area before
F2FS_SUPER_OFFSET may get corrupted when super block is committed.

Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/super.c