summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2016-10-24 15:13:25 -0400
committerJens Axboe <axboe@fb.com>2016-10-24 13:18:14 -0600
commit423221d1745b53656db896bd34646d09d620c759 (patch)
tree69d4f88319c80ea44db52ad5312e2fde14e6106d /drivers/block
parentb4a1278c78bc939b3e29c3ad21ceaa636b0ca8c8 (diff)
nbd: fix incorrect unlock of nbd->sock_lock in sock_shutdown
Commit 0eadf37afc250 ("nbd: allow block mq to deal with timeouts") changed normal usage of nbd->sock_lock to use spin_lock/spin_unlock rather than the *_irq variants, but it missed this unlock in an error path. Found by Coverity, CID 1373871. Signed-off-by: John W. Linville <linville@tuxdriver.com> Cc: Josef Bacik <jbacik@fb.com> Cc: Jens Axboe <axboe@fb.com> Cc: Markus Pargmann <mpa@pengutronix.de> Fixes: 0eadf37afc250 ("nbd: allow block mq to deal with timeouts") Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/nbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index ba405b55329f..19a16b2dbb91 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -164,7 +164,7 @@ static void sock_shutdown(struct nbd_device *nbd)
spin_lock(&nbd->sock_lock);
if (!nbd->sock) {
- spin_unlock_irq(&nbd->sock_lock);
+ spin_unlock(&nbd->sock_lock);
return;
}