On (24/10/08 13:57), Christoph Hellwig wrote: > Now that we stop sd and sr from submitting passthrough commands from > their ->release methods we can and should start the drain before taking > ->open_mutex, so that we can entirely prevent this kind of deadlock by > ensuring that the disk is clearly marked dead before open_mutex is > taken in del_gendisk. > > This includes a revert of commit 7e04da2dc701 ("block: fix deadlock > between sd_remove & sd_release"), which was a partial fix for a similar > deadlock. > > Reported-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx> > Suggested-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx> > Signed-off-by: Christoph Hellwig <hch@xxxxxx> FWIW Reviewed-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>