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>
Sun, 8 Apr 2018 11:07:40 +0000 (04:07 -0700)
commit68afcb259568528d714737ad0d665dcc4c5555bd
tree8965a0ede68f9401661a4543279e4e38b2c8bf82
parent6b4edfb10398cae62114f95201bdd2e997319920
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