OSDN Git Service

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)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 9 Jul 2018 00:29:00 +0000 (17:29 -0700)
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>
fs/f2fs/file.c

index 4334683..e1808ed 100644 (file)
@@ -2732,6 +2732,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;
                                }