Skip to contentSkip to conversation

nbd: fix sparse warning

PATCH New Alex Elder 1 participant 1 message Feb 26, 2013 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Alex Elder

author
#1 lore raw

PATCH 1/1 nbd: fix sparse warning

In reply to a message not in the archive

I just fixed this in "drivers/block/rbd.c" and I noticed that "drivers/block/nbd.c" has the same problem. Fix a warning issued by sparse by adding some lockdep annotations to indicate the queue lock gets dropped (because it's held when do_nbd_request() is called) and re-acquired within the function.

---
 drivers/block/nbd.c |    1 +
 1 file changed, 1 insertion(+)
drivers/block/nbd.c +1 -0
Index: b/drivers/block/nbd.c
===================================================================
@@ -551,6 +551,7 @@ static int nbd_thread(void *data)
  */
 
 static void do_nbd_request(struct request_queue *q)
+		__releases(q->queue_lock) __acquires(q->queue_lock)
 {
 	struct request *req;