blkcg: drop local variable @q from blkg_destroy()
authorTejun Heo <tj@kernel.org>
Tue, 5 Jun 2012 11:36:44 +0000 (13:36 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 6 Jun 2012 06:35:31 +0000 (08:35 +0200)
blkg_destroy() caches @blkg->q in local variable @q.  While there are
two places which needs @blkg->q, only lockdep_assert_held() used the
local variable leading to unused local variable warning if lockdep is
configured out.  Drop the local variable and just use @blkg->q
directly.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Rakesh Iyer <rni@google.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-cgroup.c

index 4ab7420ba465a93593a22aaa84de199664d268df..e7dee617358e810aec57ff25162ff95604fabb3c 100644 (file)
@@ -241,10 +241,9 @@ EXPORT_SYMBOL_GPL(blkg_lookup_create);
 
 static void blkg_destroy(struct blkcg_gq *blkg)
 {
-       struct request_queue *q = blkg->q;
        struct blkcg *blkcg = blkg->blkcg;
 
-       lockdep_assert_held(q->queue_lock);
+       lockdep_assert_held(blkg->q->queue_lock);
        lockdep_assert_held(&blkcg->lock);
 
        /* Something wrong if we are trying to remove same group twice */