block: call bio_associate_blkg from bio_reset
PATCH 1/1 block: call bio_associate_blkg from bio_reset
Call bio_associate_blkg just like bio_set_dev did in the callers before the conversion to set the block device in bio_reset.
Fixes a7c50c940477 ("block: pass a block_device and opf to bio_reset")
Reported-by [email protected]
Tested-by [email protected]
Signed-off-by Christoph Hellwig <[email protected]>
--- block/bio.c | 2 ++ 1 file changed, 2 insertions(+)
block/bio.c +2 -0
@@ -310,6 +310,8 @@ void bio_reset(struct bio *bio, struct block_device *bdev, unsigned int opf)memset (bio,0 ,BIO_RESET_BYTES );atomic_set (&bio->__bi_remaining,1 ); bio->bi_bdev = bdev; +if (bio->bi_bdev) +bio_associate_blkg (bio); bio->bi_opf = opf; }EXPORT_SYMBOL (bio_reset);
Signature · 1 line
2.30.2
Quoted 8 lines · Christoph Hellwig
Call
bio_associate_blkgjust likebio_set_devdid in the callers before the conversion to set the block device inbio_reset.Fixes a7c50c940477 ("block: pass a block_device and opf to bio_reset")Reported-by [email protected]Tested-by [email protected]Signed-off-by Christoph Hellwig <[email protected]>---
This fixes the issue mentioned by Jens on the report, not sure if I can add reviewed-by after tested by tag, if not, please drop reviewed-by tag..
Tested-by Chaitanya Kulkarni <[email protected]>
Reviewed-by Chaitanya Kulkarni <[email protected]>
-ck
Quoted 4 lines · Christoph Hellwig
Call
bio_associate_blkgjust likebio_set_devdid in the callers before the conversion to set the block device inbio_reset.
Applied, thanks!
[1/1] block: call bio_associate_blkg from bio_reset
commit: 78e3437450be5236c4949e377c9b848bbcd4fcb0
Best regards,
Signature · 1 line
Jens Axboe