linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: qiwuchen55@gmail.com
To: mark@fasheh.com, jlbec@evilplan.org, joseph.qi@linux.alibaba.com,
	trivial@kernel.org
Cc: ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org,
	chenqiwu <chenqiwu@xiaomi.com>
Subject: [PATCH] ocfs2: remove trivial nowait check for buffered read/write
Date: Sat,  1 Feb 2020 15:12:58 +0800	[thread overview]
Message-ID: <1580541178-7853-1-git-send-email-qiwuchen55@gmail.com> (raw)

From: chenqiwu <chenqiwu@xiaomi.com>

Remove trivial nowait check for buffered read/write, since
buffered read is checked in generic_file_read_iter()->
generic_file_buffered_read(), buffered write is checked in
generic_write_checks().

Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
---
 fs/ocfs2/file.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 9876db5..6a5e3b0 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2298,9 +2298,6 @@ static ssize_t ocfs2_file_write_iter(struct kiocb *iocb,
 		file->f_path.dentry->d_name.name,
 		(unsigned int)from->nr_segs);	/* GRRRRR */
 
-	if (!direct_io && nowait)
-		return -EOPNOTSUPP;
-
 	if (count == 0)
 		return 0;
 
@@ -2453,9 +2450,6 @@ static ssize_t ocfs2_file_read_iter(struct kiocb *iocb,
 		goto bail;
 	}
 
-	if (!direct_io && nowait)
-		return -EOPNOTSUPP;
-
 	/*
 	 * buffered reads protect themselves in ->readpage().  O_DIRECT reads
 	 * need locks to protect pending reads from racing with truncate.
-- 
1.9.1


             reply	other threads:[~2020-02-01  7:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-01  7:12 qiwuchen55 [this message]
2020-02-02  9:01 ` [PATCH] ocfs2: remove trivial nowait check for buffered read/write Joseph Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1580541178-7853-1-git-send-email-qiwuchen55@gmail.com \
    --to=qiwuchen55@gmail.com \
    --cc=chenqiwu@xiaomi.com \
    --cc=jlbec@evilplan.org \
    --cc=joseph.qi@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark@fasheh.com \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).