summaryrefslogtreecommitdiff
path: root/block/bsg.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2007-06-07 13:24:06 +0200
committerJens Axboe <jens.axboe@oracle.com>2007-07-16 08:52:46 +0200
commitefba1a31f3f8fe9672eb96cd26e97fb96891f1c0 (patch)
tree052f4c58f618ef73cd2542425f618ac9b78410e7 /block/bsg.c
parente7d72173248c29c6f9ba14e40374266e1b954964 (diff)
downloadlinux-3.10-efba1a31f3f8fe9672eb96cd26e97fb96891f1c0.tar.gz
linux-3.10-efba1a31f3f8fe9672eb96cd26e97fb96891f1c0.tar.bz2
linux-3.10-efba1a31f3f8fe9672eb96cd26e97fb96891f1c0.zip
bsg: fix the deadlock on discarding done commands
The previous commit introduced a deadlock in discarding commands, because we forget to unlock the bd spinlock. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/bsg.c')
-rw-r--r--block/bsg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/bsg.c b/block/bsg.c
index 2f78d7d34b9..5f4abc902a0 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -471,6 +471,7 @@ static int bsg_complete_all_commands(struct bsg_device *bd)
spin_unlock_irq(&bd->lock);
break;
}
+ spin_unlock_irq(&bd->lock);
bc = bsg_get_done_cmd(bd);
if (IS_ERR(bc))