4.17-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Yunlei He <heyun...@huawei.com>

[ Upstream commit cba41be08cb182476fec4d318a8a8f2f8361a901 ]

This patch fix missing clear FI_NO_PREALLOC in some error case

Signed-off-by: Yunlei He <heyun...@huawei.com>
Reviewed-by: Chao Yu <yuch...@huawei.com>
Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org>
Signed-off-by: Sasha Levin <alexander.le...@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
 fs/f2fs/file.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -2927,6 +2927,8 @@ static ssize_t f2fs_file_write_iter(stru
                                                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;
                                }


Reply via email to