From efba1a31f3f8fe9672eb96cd26e97fb96891f1c0 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Thu, 7 Jun 2007 13:24:06 +0200 Subject: 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 Signed-off-by: Jens Axboe --- block/bsg.c | 1 + 1 file changed, 1 insertion(+) (limited to 'block/bsg.c') diff --git a/block/bsg.c b/block/bsg.c index 2f78d7d..5f4abc9 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)) -- cgit v1.1