summaryrefslogtreecommitdiff
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorDamien Le Moal <dlemoal@kernel.org>2024-05-01 20:08:58 +0900
committerJens Axboe <axboe@kernel.dk>2024-05-01 08:08:43 -0600
commit9e78c38ab30b14c1d6a07c61d57ac5e2f12fa568 (patch)
tree60eead573783a7860e77fb62d1840ae0fbaf2a71 /drivers/macintosh
parent19aad274c22b96fc4c0113d87cc8a083c87c467e (diff)
downloadlinux-9e78c38ab30b14c1d6a07c61d57ac5e2f12fa568.tar.gz
linux-9e78c38ab30b14c1d6a07c61d57ac5e2f12fa568.tar.bz2
linux-9e78c38ab30b14c1d6a07c61d57ac5e2f12fa568.zip
block: Hold a reference on zone write plugs to schedule submission
Since a zone write plug BIO work is a field of struct blk_zone_wplug, we must ensure that a zone write plug is never freed when its BIO submission work is queued or running. Do this by holding a reference on the zone write plug when the submission work is scheduled for execution with queue_work() and releasing the reference at the end of the execution of the work function blk_zone_wplug_bio_work(). The helper function disk_zone_wplug_schedule_bio_work() is introduced to get a reference on a zone write plug and queue its work. This helper is used in disk_zone_wplug_unplug_bio() and disk_zone_wplug_handle_error(). Fixes: dd291d77cc90 ("block: Introduce zone write plugging") Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Link: https://lore.kernel.org/r/20240501110907.96950-6-dlemoal@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/macintosh')
0 files changed, 0 insertions, 0 deletions