All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ocfs2: remove trivial nowait check for buffered read/write
@ 2020-02-01  7:12 qiwuchen55
  2020-02-02  9:01   ` [Ocfs2-devel] " Joseph Qi
  0 siblings, 1 reply; 3+ messages in thread
From: qiwuchen55 @ 2020-02-01  7:12 UTC (permalink / raw)
  To: mark, jlbec, joseph.qi, trivial; +Cc: ocfs2-devel, linux-kernel, chenqiwu

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


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

end of thread, other threads:[~2020-02-02  9:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-01  7:12 [PATCH] ocfs2: remove trivial nowait check for buffered read/write qiwuchen55
2020-02-02  9:01 ` Joseph Qi
2020-02-02  9:01   ` [Ocfs2-devel] " Joseph Qi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.