Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b6fb78e authored by Lihong Kou's avatar Lihong Kou Committed by Jaegeuk Kim
Browse files

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: default avatarLihong Kou <koulihong@huawei.com>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 39ebaaa8
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -3252,11 +3252,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;