Skip to contentSkip to conversation

blkcg: drop local variable @q from blkg_destroy()

PATCH New Tejun Heo 1 participant 1 message May 16, 2012

Subsystems (2)
lore
Share & tools
lore

Tejun Heo

author maintainer
#0 lore raw

PATCH 1/1 blkcg: drop local variable @q from blkg_destroy()

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.

---
 block/blk-cgroup.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
block/blk-cgroup.c +1 -2
index 4465329..3186404 100644
@@ -271,11 +271,10 @@ 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;
 	int i;
 
-	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 */
Signature · 1 line
1.7.7.3