[PATCH] ocfs2: remove trivial nowait check for buffered read/write
From: qiwuchen55
Date: Sat Feb 01 2020 - 02:16:42 EST
From: chenqiwu <chenqiwu@xxxxxxxxxx>
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@xxxxxxxxxx>
---
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