linux-block.vger.kernel.org archive mirror
 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

* Re: [PATCH] fs/iomap: remove redundant check in iomap_dio_rw()
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2019-10-29  9:45 UTC (permalink / raw)
  To: Joseph Qi, Christoph Hellwig, Darrick J. Wong, Jens Axboe
  Cc: linux-fsdevel, linux-xfs, linux-block

Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
-- 
Johannes Thumshirn                            SUSE Labs Filesystems
jthumshirn@suse.de                                +49 911 74053 689
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5
90409 Nürnberg
Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

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

* Re: [PATCH] fs/iomap: remove redundant check in iomap_dio_rw()
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2019-10-29 16:11 UTC (permalink / raw)
  To: Joseph Qi, Christoph Hellwig, Darrick J. Wong
  Cc: linux-fsdevel, linux-xfs, linux-block

On 10/29/19 3:40 AM, Joseph Qi wrote:
> 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;
> 

Reviewed-by: Jens Axboe <axboe@kernel.dk>

-- 
Jens Axboe


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

* Re: [PATCH] fs/iomap: remove redundant check in iomap_dio_rw()
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Darrick J. Wong @ 2019-10-29 16:14 UTC (permalink / raw)
  To: Joseph Qi
  Cc: Christoph Hellwig, Jens Axboe, linux-fsdevel, linux-xfs, linux-block

On Tue, Oct 29, 2019 at 05:40:47PM +0800, Joseph Qi wrote:
> We've already check if it is READ iov_iter, no need check again.
> 
> Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com>

Applied to the iomap tree, thanks.

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
>  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	[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;
as well as URLs for NNTP newsgroup(s).