linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH] f2fs: remove duplicate code in f2fs_file_write_iter
@ 2019-08-05  7:27 Lihong Kou
  2019-08-05  7:29 ` Chao Yu
  0 siblings, 1 reply; 2+ messages in thread
From: Lihong Kou @ 2019-08-05  7:27 UTC (permalink / raw)
  To: yuchao0, jaegeuk
  Cc: fangwei1, linux-f2fs-devel, linux-fsdevel, linux-kernel, koulihong

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>
---
 fs/f2fs/file.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 3e58a6f..50a87cf 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -3134,11 +3134,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;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: remove duplicate code in f2fs_file_write_iter
  2019-08-05  7:27 [f2fs-dev] [PATCH] f2fs: remove duplicate code in f2fs_file_write_iter Lihong Kou
@ 2019-08-05  7:29 ` Chao Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2019-08-05  7:29 UTC (permalink / raw)
  To: Lihong Kou, jaegeuk
  Cc: fangwei1, linux-f2fs-devel, linux-fsdevel, linux-kernel

On 2019/8/5 15:27, Lihong Kou wrote:
> 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>

Thanks,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-05  7:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-05  7:27 [f2fs-dev] [PATCH] f2fs: remove duplicate code in f2fs_file_write_iter Lihong Kou
2019-08-05  7:29 ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).