[PATCH v3 7/7] s390/block/dasd: remove obsolete while -EBUSY loop
From: Ming Lei
Date: Wed May 06 2015 - 00:27:10 EST
From: Jarod Wilson <jarod@xxxxxxxxxx>
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@xxxxxxxxxxxxx>
CC: Jens Axboe <axboe@xxxxxxxxx>
CC: Tejun Heo <tj@xxxxxxxxxx>
CC: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>
CC: Markus Pargmann <mpa@xxxxxxxxxxxxxx>
CC: Stefan Weinhuber <wein@xxxxxxxxxx>
CC: Stefan Haberland <stefan.haberland@xxxxxxxxxx>
CC: Sebastian Ott <sebott@xxxxxxxxxxxxxxxxxx>
CC: Fabian Frederick <fabf@xxxxxxxxx>
CC: Ming Lei <ming.lei@xxxxxxxxxxxxx>
CC: David Herrmann <dh.herrmann@xxxxxxxxx>
CC: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
CC: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
CC: nbd-general@xxxxxxxxxxxxxxxxxxxxx
CC: linux-s390@xxxxxxxxxxxxxxx
Reviewed-by: Christoph Hellwig <hch@xxxxxx>
Acked-by: Sebastian Ott <sebott@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxxxxx>
Signed-off-by: Jarod Wilson <jarod@xxxxxxxxxx>
---
drivers/s390/block/dasd_genhd.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c
index 2af4619..ef1d9fb 100644
--- a/drivers/s390/block/dasd_genhd.c
+++ b/drivers/s390/block/dasd_genhd.c
@@ -99,9 +99,8 @@ void dasd_gendisk_free(struct dasd_block *block)
int dasd_scan_partitions(struct dasd_block *block)
{
struct block_device *bdev;
- int retry, rc;
+ int rc;
- retry = 5;
bdev = bdget_disk(block->gdp, 0);
if (!bdev) {
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);
- while (rc == -EBUSY && retry > 0) {
- schedule();
- rc = blkdev_reread_part(bdev);
- retry--;
+ if (rc)
DBF_DEV_EVENT(DBF_ERR, block->base,
- "scan partitions error, retry %d rc %d",
- retry, rc);
- }
+ "scan partitions error, rc %d", rc);
/*
* Since the matching blkdev_put call to the blkdev_get in
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/