We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1eb2062 commit d36a9eaCopy full SHA for d36a9ea
block/blk-core.c
@@ -254,14 +254,15 @@ EXPORT_SYMBOL_GPL(blk_clear_pm_only);
254
255
static void blk_free_queue_rcu(struct rcu_head *rcu_head)
256
{
257
- kmem_cache_free(blk_requestq_cachep,
258
- container_of(rcu_head, struct request_queue, rcu_head));
+ struct request_queue *q = container_of(rcu_head,
+ struct request_queue, rcu_head);
259
+
260
+ percpu_ref_exit(&q->q_usage_counter);
261
+ kmem_cache_free(blk_requestq_cachep, q);
262
}
263
264
static void blk_free_queue(struct request_queue *q)
265
- percpu_ref_exit(&q->q_usage_counter);
-
266
if (q->poll_stat)
267
blk_stat_remove_callback(q, q->poll_cb);
268
blk_stat_free_callback(q->poll_cb);
0 commit comments