提交 0b86f789 编写于 作者: L Lihong Kou 提交者: Jaegeuk Kim

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: NLihong Kou <koulihong@huawei.com>
Reviewed-by: NChao Yu <yuchao0@huawei.com>
Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
上级 d3a1a0e1
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册