Linux block layer
 help / color / mirror / Atom feed
* [PATCH] fs/iomap: remove redundant check in iomap_dio_rw()
@ 2019-10-29  9:40 Joseph Qi
  2019-10-29  9:45 ` Johannes Thumshirn
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Joseph Qi @ 2019-10-29  9:40 UTC (permalink / raw)
  To: Christoph Hellwig, Darrick J. Wong, Jens Axboe
  Cc: linux-fsdevel, linux-xfs, linux-block

We've already check if it is READ iov_iter, no need check again.

Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com>
---
 fs/iomap/direct-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
index 1fc28c2..9712648 100644
--- a/fs/iomap/direct-io.c
+++ b/fs/iomap/direct-io.c
@@ -430,7 +430,7 @@ static void iomap_dio_bio_end_io(struct bio *bio)
 		if (pos >= dio->i_size)
 			goto out_free_dio;
 
-		if (iter_is_iovec(iter) && iov_iter_rw(iter) == READ)
+		if (iter_is_iovec(iter))
 			dio->flags |= IOMAP_DIO_DIRTY;
 	} else {
 		flags |= IOMAP_WRITE;
-- 
1.8.3.1


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

end of thread, other threads:[~2019-10-29 16:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-29  9:40 [PATCH] fs/iomap: remove redundant check in iomap_dio_rw() Joseph Qi
2019-10-29  9:45 ` Johannes Thumshirn
2019-10-29 16:11 ` Jens Axboe
2019-10-29 16:14 ` Darrick J. Wong

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