diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 204442fad33cfb71bd5b54236c8d3dc46998ea5b..0676cf7a41b51bad49c44358419b9dd8aeb312f7 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -1278,14 +1278,13 @@ int blkcg_init_queue(struct request_queue *q) preloaded = !radix_tree_preload(GFP_KERNEL); /* Make sure the root blkg exists. */ - rcu_read_lock(); + /* spin_lock_irq can serve as RCU read-side critical section. */ spin_lock_irq(&q->queue_lock); blkg = blkg_create(&blkcg_root, q, new_blkg); if (IS_ERR(blkg)) goto err_unlock; q->root_blkg = blkg; spin_unlock_irq(&q->queue_lock); - rcu_read_unlock(); if (preloaded) radix_tree_preload_end(); @@ -1311,7 +1310,6 @@ int blkcg_init_queue(struct request_queue *q) return ret; err_unlock: spin_unlock_irq(&q->queue_lock); - rcu_read_unlock(); if (preloaded) radix_tree_preload_end(); return PTR_ERR(blkg);