f2fs: fix possible data corruption in f2fs_write_begin()
authorJan Kara <jack@suse.cz>
Wed, 22 Oct 2014 13:21:47 +0000 (15:21 +0200)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 4 Nov 2014 00:07:37 +0000 (16:07 -0800)
commit9234f3190bf8b25b11b105191d408ac50a107948
treed53dde5cb1cce2ca8e8007e41d33833a6400464c
parent2cc221861132e0ca54e3f52d506520ded8520e80
f2fs: fix possible data corruption in f2fs_write_begin()

f2fs_write_begin() doesn't initialize the 'dn' variable if the inode has
inline data. However it uses its contents to decide whether it should
just zero out the page or load data to it. Thus if we are unlucky we can
zero out page contents instead of loading inline data into a page.

CC: stable@vger.kernel.org
CC: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c