diff mbox series

block: remove an incorrect check from blk_rq_append_bio

Message ID 20210409150447.1977410-1-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series block: remove an incorrect check from blk_rq_append_bio | expand

Commit Message

Christoph Hellwig April 9, 2021, 3:04 p.m. UTC
blk_rq_append_bio is also used for the copy case, not just the map case,
so tis debug check is not correct.

Fixes: 393bb12e0058 ("block: stop calling blk_queue_bounce for passthrough requests")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Guenter Roeck <linux@roeck-us.net>
---
 block/blk-map.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Himanshu Madhani April 9, 2021, 3:27 p.m. UTC | #1
> On Apr 9, 2021, at 10:04 AM, Christoph Hellwig <hch@lst.de> wrote:
> 
> blk_rq_append_bio is also used for the copy case, not just the map case,
> so tis debug check is not correct.
> 

Small nit.. “this” spelled incorrectly above

> Fixes: 393bb12e0058 ("block: stop calling blk_queue_bounce for passthrough requests")
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Tested-by: Guenter Roeck <linux@roeck-us.net>
> ---
> block/blk-map.c | 3 ---
> 1 file changed, 3 deletions(-)
> 
> diff --git a/block/blk-map.c b/block/blk-map.c
> index dac78376acc899..3743158ddaeb76 100644
> --- a/block/blk-map.c
> +++ b/block/blk-map.c
> @@ -485,9 +485,6 @@ int blk_rq_append_bio(struct request *rq, struct bio *bio)
> 	struct bio_vec bv;
> 	unsigned int nr_segs = 0;
> 
> -	if (WARN_ON_ONCE(rq->q->limits.bounce != BLK_BOUNCE_NONE))
> -		return -EINVAL;
> -
> 	bio_for_each_bvec(bv, bio, iter)
> 		nr_segs++;
> 
> -- 
> 2.30.1
> 

Looks good otherwise. 

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

--
Himanshu Madhani	 Oracle Linux Engineering
Chaitanya Kulkarni April 9, 2021, 9:05 p.m. UTC | #2
On 4/9/21 08:08, Christoph Hellwig wrote:
> blk_rq_append_bio is also used for the copy case, not just the map case,
> so tis debug check is not correct.
>
> Fixes: 393bb12e0058 ("block: stop calling blk_queue_bounce for passthrough requests")
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Tested-by: Guenter Roeck <linux@roeck-us.net>

With 's/tis/this/' can be done at the time of applying patch.

The commit 393bb12e0058 does add check in question here.

Looks good.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Jens Axboe April 12, 2021, 12:45 p.m. UTC | #3
On 4/9/21 9:04 AM, Christoph Hellwig wrote:
> blk_rq_append_bio is also used for the copy case, not just the map case,
> so tis debug check is not correct.

Applied, thanks.
diff mbox series

Patch

diff --git a/block/blk-map.c b/block/blk-map.c
index dac78376acc899..3743158ddaeb76 100644
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@ -485,9 +485,6 @@  int blk_rq_append_bio(struct request *rq, struct bio *bio)
 	struct bio_vec bv;
 	unsigned int nr_segs = 0;
 
-	if (WARN_ON_ONCE(rq->q->limits.bounce != BLK_BOUNCE_NONE))
-		return -EINVAL;
-
 	bio_for_each_bvec(bv, bio, iter)
 		nr_segs++;