public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs: remove trivial nowait check
@ 2020-02-01  3:51 qiwuchen55
  2020-02-06 17:17 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: qiwuchen55 @ 2020-02-01  3:51 UTC (permalink / raw)
  To: clm, josef, dsterba, trivial; +Cc: linux-btrfs, chenqiwu

From: chenqiwu <chenqiwu@xiaomi.com>

Remove trivial nowait check for btrfs_file_write_iter(),
since buffered writes will return -EINVAL if IOCB_NOWAIT
passed in the follow-up function generic_write_checks().

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

diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index a16da27..320af95 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1896,10 +1896,6 @@ static ssize_t btrfs_file_write_iter(struct kiocb *iocb,
 	loff_t oldsize;
 	int clean_page = 0;
 
-	if (!(iocb->ki_flags & IOCB_DIRECT) &&
-	    (iocb->ki_flags & IOCB_NOWAIT))
-		return -EOPNOTSUPP;
-
 	if (iocb->ki_flags & IOCB_NOWAIT) {
 		if (!inode_trylock(inode))
 			return -EAGAIN;
-- 
1.9.1


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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-01  3:51 [PATCH] btrfs: remove trivial nowait check qiwuchen55
2020-02-06 17:17 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox