Since SLOB was removed and since commit 6c6c47b063b5 ("mm, slab: call kvfree_rcu_barrier() from kmem_cache_destroy()"), it is not necessary to use call_rcu when the callback only performs kmem_cache_free. Use kfree_rcu() directly. The changes were made using Coccinelle. Signed-off-by: Hongling Zeng <zenghongling@xxxxxxxxxx> --- block/blk-core.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index bc5e8c5..459eb7e 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -245,14 +245,6 @@ void blk_clear_pm_only(struct request_queue *q) } EXPORT_SYMBOL_GPL(blk_clear_pm_only); -static void blk_free_queue_rcu(struct rcu_head *rcu_head) -{ - struct request_queue *q = container_of(rcu_head, - struct request_queue, rcu_head); - - percpu_ref_exit(&q->q_usage_counter); - kmem_cache_free(blk_requestq_cachep, q); -} static void blk_free_queue(struct request_queue *q) { @@ -261,7 +253,7 @@ static void blk_free_queue(struct request_queue *q) blk_mq_release(q); ida_free(&blk_queue_ida, q->id); - call_rcu(&q->rcu_head, blk_free_queue_rcu); + kfree_rcu(q, rcu_head); } /** -- 2.1.0