]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
f2fs: fix missing clear FI_NO_PREALLOC in some error case
authorYunlei He <heyunlei@huawei.com>
Tue, 24 Apr 2018 03:40:19 +0000 (11:40 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Aug 2018 05:47:39 +0000 (07:47 +0200)
[ Upstream commit cba41be08cb182476fec4d318a8a8f2f8361a901 ]

This patch fix missing clear FI_NO_PREALLOC in some error case

Signed-off-by: Yunlei He <heyunlei@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/f2fs/file.c

index 5d99fd113a8052e3758851ae374155269f4781ce..ffa20409c7033a3eee06857c921152d3a5d24718 100644 (file)
@@ -2927,6 +2927,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;
                                }