Skip to content

Commit

Permalink
bsg: fix the deadlock on discarding done commands
Browse files Browse the repository at this point in the history
The previous commit introduced a deadlock in discarding commands,
because we forget to unlock the bd spinlock.

Signed-off-by: FUJITA Tomonori <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
fujita authored and Jens Axboe committed Jul 16, 2007
1 parent e7d7217 commit efba1a3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions block/bsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit efba1a3

Please sign in to comment.