f2fs: fix to clear FI_NO_PREALLOC
authorChao Yu <yuchao0@huawei.com>
Mon, 13 Nov 2017 09:32:39 +0000 (17:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Dec 2017 08:53:14 +0000 (09:53 +0100)
commita76d81af17ceadd8bae46da297d8e24dd8ea0838
treeca4ffa6b9ab814aa9783a14c9c9bc015be2efb93
parent6610b9cb80ad9a58f71940b9658e3116262663db
f2fs: fix to clear FI_NO_PREALLOC

[ Upstream commit 28cfafb73853f0494b06649716687a3ea07681d5 ]

We need to clear FI_NO_PREALLOC flag in error path of f2fs_file_write_iter,
otherwise we will lose the chance to preallocate blocks in latter write()
at one time.

Fixes: dc91de78e5e1 ("f2fs: do not preallocate blocks which has wrong buffer")
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/f2fs/file.c