blkfront: Fix blkfront backend switch race (bdev open)
authorDaniel Stodden <daniel.stodden@citrix.com>
Sat, 7 Aug 2010 16:36:53 +0000 (18:36 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Sat, 7 Aug 2010 16:38:43 +0000 (18:38 +0200)
commit139617437aff1f0d3b57c2d7cc60e60efc8fe6c3
tree2c903b3f6456ab4a7d70c16c864ceb63bc366a5e
parentb70f5fa043b318659c936d8c3c696250e6528944
blkfront: Fix blkfront backend switch race (bdev open)

We need not mind if users grab a late handle on a closing disk. We
probably even should not. But we have to make sure it's not a dead
one already

Let the bdev deal with a gendisk deleted under its feet. Takes the
info mutex to decide a race against backend closing.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
drivers/block/xen-blkfront.c