s390/block/dasd: remove obsolete while -EBUSY loop

With the mutex_trylock bit gone from blkdev_reread_part(), the retry logic
in dasd_scan_partitions() shouldn't be necessary.

CC: Christoph Hellwig <hch@infradead.org>
CC: Jens Axboe <axboe@kernel.dk>
CC: Tejun Heo <tj@kernel.org>
CC: Alexander Viro <viro@zeniv.linux.org.uk>
CC: Markus Pargmann <mpa@pengutronix.de>
CC: Stefan Weinhuber <wein@de.ibm.com>
CC: Stefan Haberland <stefan.haberland@de.ibm.com>
CC: Sebastian Ott <sebott@linux.vnet.ibm.com>
CC: Fabian Frederick <fabf@skynet.be>
CC: Ming Lei <ming.lei@canonical.com>
CC: David Herrmann <dh.herrmann@gmail.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Peter Zijlstra <peterz@infradead.org>
CC: nbd-general@lists.sourceforge.net
CC: linux-s390@vger.kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
Jarod Wilson 2015-05-06 12:26:28 +08:00 committed by Jens Axboe
parent 6029a06c88
commit a05e578055

View File

@ -99,9 +99,8 @@ void dasd_gendisk_free(struct dasd_block *block)
int dasd_scan_partitions(struct dasd_block *block) int dasd_scan_partitions(struct dasd_block *block)
{ {
struct block_device *bdev; struct block_device *bdev;
int retry, rc; int rc;
retry = 5;
bdev = bdget_disk(block->gdp, 0); bdev = bdget_disk(block->gdp, 0);
if (!bdev) { if (!bdev) {
DBF_DEV_EVENT(DBF_ERR, block->base, "%s", DBF_DEV_EVENT(DBF_ERR, block->base, "%s",
@ -118,14 +117,9 @@ int dasd_scan_partitions(struct dasd_block *block)
} }
rc = blkdev_reread_part(bdev); rc = blkdev_reread_part(bdev);
while (rc == -EBUSY && retry > 0) { if (rc)
schedule();
rc = blkdev_reread_part(bdev);
retry--;
DBF_DEV_EVENT(DBF_ERR, block->base, DBF_DEV_EVENT(DBF_ERR, block->base,
"scan partitions error, retry %d rc %d", "scan partitions error, rc %d", rc);
retry, rc);
}
/* /*
* Since the matching blkdev_put call to the blkdev_get in * Since the matching blkdev_put call to the blkdev_get in