summaryrefslogtreecommitdiff
path: root/fs/f2fs/file.c
diff options
context:
space:
mode:
authorLihong Kou <koulihong@huawei.com>2019-08-05 15:27:24 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2019-08-23 07:57:14 -0700
commit0b86f78920919cf36239f4e187ebad7f5d78b5f8 (patch)
tree1eefbc7eee784e8c2ec650cfca37f5bdfec2252c /fs/f2fs/file.c
parentd3a1a0e1bf5d4d2107d6b485c5d33e65acaa7cf6 (diff)
f2fs: remove duplicate code in f2fs_file_write_iter
We will do the same check in generic_write_checks. if (iocb->ki_flags & IOCB_NOWAIT) && !(iocb->ki_flags & IOCB_DIRECT) return -EINVAL; just remove the same check in f2fs_file_write_iter. Signed-off-by: Lihong Kou <koulihong@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r--fs/f2fs/file.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 16f39c0c457d..b1f38f2795bc 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -3160,11 +3160,6 @@ static ssize_t f2fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
goto out;
}
- if ((iocb->ki_flags & IOCB_NOWAIT) && !(iocb->ki_flags & IOCB_DIRECT)) {
- ret = -EINVAL;
- goto out;
- }
-
if (!inode_trylock(inode)) {
if (iocb->ki_flags & IOCB_NOWAIT) {
ret = -EAGAIN;