summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2024-12-17 13:03:09 -0800
committerJens Axboe <axboe@kernel.dk>2024-12-23 08:17:23 -0700
commitfa8555630b32da7c239a1e01e9eb1bb040be59ac (patch)
treee65ec1fb5ee8426a0cbe7825d55b86486d413d9b /block
parentcbac56e5237dbec9ae3d896e71f24e95e06eafa3 (diff)
downloadlinux-stable-fa8555630b32da7c239a1e01e9eb1bb040be59ac.tar.gz
linux-stable-fa8555630b32da7c239a1e01e9eb1bb040be59ac.tar.bz2
linux-stable-fa8555630b32da7c239a1e01e9eb1bb040be59ac.zip
blk-zoned: Improve the queue reference count strategy documentation
For the blk_queue_exit() calls, document where the corresponding code can be found that increases q->q_usage_counter. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20241217210310.645966-4-bvanassche@acm.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/blk-zoned.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/block/blk-zoned.c b/block/blk-zoned.c
index 954724a2e3c6..7876a6458022 100644
--- a/block/blk-zoned.c
+++ b/block/blk-zoned.c
@@ -582,6 +582,7 @@ static inline void blk_zone_wplug_bio_io_error(struct blk_zone_wplug *zwplug,
bio_clear_flag(bio, BIO_ZONE_WRITE_PLUGGING);
bio_io_error(bio);
disk_put_zone_wplug(zwplug);
+ /* Drop the reference taken by disk_zone_wplug_add_bio(() */
blk_queue_exit(q);
}
@@ -893,10 +894,7 @@ void blk_zone_write_plug_init_request(struct request *req)
break;
}
- /*
- * Drop the extra reference on the queue usage we got when
- * plugging the BIO and advance the write pointer offset.
- */
+ /* Drop the reference taken by disk_zone_wplug_add_bio(). */
blk_queue_exit(q);
zwplug->wp_offset += bio_sectors(bio);