]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
nbd: fix sparse warning
authorAlex Elder <elder@inktank.com>
Thu, 28 Feb 2013 01:05:28 +0000 (17:05 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 28 Feb 2013 03:10:22 +0000 (19:10 -0800)
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.

Signed-off-by: Alex Elder <elder@inktank.com>
Cc: Paul Clements <paul.clements@steeleye.com>
Cc: Paul Clements <paul.clements@us.sios.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/nbd.c

index 52003d7a69ae9e5753285dc4ae3b96f6f8b7b535..7fecc784be01321cf0954024252e47fa777eb763 100644 (file)
@@ -564,6 +564,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;