]> Git Repo - linux.git/commitdiff
block: cleanup q->srcu
authorMing Lei <[email protected]>
Tue, 11 Jan 2022 12:34:01 +0000 (20:34 +0800)
committerJens Axboe <[email protected]>
Mon, 17 Jan 2022 14:24:45 +0000 (07:24 -0700)
srcu structure has to be cleanup via cleanup_srcu_struct(), so fix it.

Reported-by: [email protected]
Fixes: 704b914f15fb ("blk-mq: move srcu from blk_mq_hw_ctx to request_queue")
Signed-off-by: Ming Lei <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
block/blk-sysfs.c

index bed4a2facd652028cc27b2be3b3da07c6a3817d2..9f32882ceb2f651c2bc227e62f7367a1962d5e70 100644 (file)
@@ -811,6 +811,9 @@ static void blk_release_queue(struct kobject *kobj)
 
        bioset_exit(&q->bio_split);
 
+       if (blk_queue_has_srcu(q))
+               cleanup_srcu_struct(q->srcu);
+
        ida_simple_remove(&blk_queue_ida, q->id);
        call_rcu(&q->rcu_head, blk_free_queue_rcu);
 }
This page took 0.058779 seconds and 4 git commands to generate.