public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bsg: fix the deadlock on discarding done commands
@ 2007-06-03 13:18 FUJITA Tomonori
  2007-06-04 14:04 ` Jens Axboe
  0 siblings, 1 reply; 13+ messages in thread
From: FUJITA Tomonori @ 2007-06-03 13:18 UTC (permalink / raw)
  To: jens.axboe; +Cc: linux-scsi

The previous commit to fix a blocking read bug put a bug that leads a
deadlock on discarding done commands. We don't need bsg_device's lock
there.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
 block/bsg.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/block/bsg.c b/block/bsg.c
index 2f78d7d..9b5f6d7 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -466,11 +466,8 @@ static int bsg_complete_all_commands(str
 	 */
 	ret = 0;
 	do {
-		spin_lock_irq(&bd->lock);
-		if (!bd->queued_cmds) {
-			spin_unlock_irq(&bd->lock);
+		if (!bd->queued_cmds)
 			break;
-		}
 
 		bc = bsg_get_done_cmd(bd);
 		if (IS_ERR(bc))
-- 
1.4.3.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-07-09 13:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-03 13:18 [PATCH] bsg: fix the deadlock on discarding done commands FUJITA Tomonori
2007-06-04 14:04 ` Jens Axboe
2007-06-04 22:03   ` FUJITA Tomonori
2007-06-07 11:23     ` Jens Axboe
2007-06-08 15:11       ` FUJITA Tomonori
2007-06-08 15:20         ` Jens Axboe
2007-06-20 13:43           ` FUJITA Tomonori
2007-07-09 12:26             ` Jens Axboe
2007-07-09 13:02               ` FUJITA Tomonori
2007-07-09 13:24                 ` Jens Axboe
2007-06-08 16:33       ` FUJITA Tomonori
2007-06-08 16:38         ` James Bottomley
2007-06-08 16:45           ` FUJITA Tomonori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox