From: Yunlei He Date: Tue, 24 Apr 2018 03:40:19 +0000 (+0800) Subject: f2fs: fix missing clear FI_NO_PREALLOC in some error case X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=cba41be08cb182476fec4d318a8a8f2f8361a901;p=openwrt%2Fstaging%2Fblogic.git f2fs: fix missing clear FI_NO_PREALLOC in some error case This patch fix missing clear FI_NO_PREALLOC in some error case Signed-off-by: Yunlei He Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index ac6452261926..a68b2cc067bc 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -2925,6 +2925,8 @@ static ssize_t f2fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from) iov_iter_count(from)) || f2fs_has_inline_data(inode) || f2fs_force_buffered_io(inode, WRITE)) { + clear_inode_flag(inode, + FI_NO_PREALLOC); inode_unlock(inode); return -EAGAIN; }