[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Nbd] [PATCH 5/7] block: dasd_genhd: convert to blkdev_reread_part



From: Ming Lei <ming.lei@...1301...>

Also remove the obsolete comment.

CC: Christoph Hellwig <hch@...1270...>
CC: Jens Axboe <axboe@...161...>
CC: Tejun Heo <tj@...1285...>
CC: Alexander Viro <viro@...1300...>
CC: Markus Pargmann <mpa@...1897...>
CC: Stefan Weinhuber <wein@...1296...>
CC: Stefan Haberland <stefan.haberland@...1296...>
CC: Sebastian Ott <sebott@...1294...>
CC: Fabian Frederick <fabf@...1980...>
CC: Ming Lei <ming.lei@...1301...>
CC: David Herrmann <dh.herrmann@...17...>
CC: Mike Galbraith <bitbucket@...1990...>
CC: Andrew Morton <akpm@...133...>
CC: Peter Zijlstra <peterz@...1270...>
CC: nbd-general@lists.sourceforge.net
CC: linux-s390@...25...
Signed-off-by: Ming Lei <ming.lei@...1301...>
Signed-off-by: Jarod Wilson <jarod@...696...>
---
 drivers/s390/block/dasd_genhd.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c
index 90f39f7..8026585 100644
--- a/drivers/s390/block/dasd_genhd.c
+++ b/drivers/s390/block/dasd_genhd.c
@@ -116,14 +116,11 @@ int dasd_scan_partitions(struct dasd_block *block)
 			      rc);
 		return -ENODEV;
 	}
-	/*
-	 * See fs/partition/check.c:register_disk,rescan_partitions
-	 * Can't call rescan_partitions directly. Use ioctl.
-	 */
-	rc = ioctl_by_bdev(bdev, BLKRRPART, 0);
+
+	rc = blkdev_reread_part(bdev);
 	while (rc == -EBUSY && retry > 0) {
 		schedule();
-		rc = ioctl_by_bdev(bdev, BLKRRPART, 0);
+		rc = blkdev_reread_part(bdev);
 		retry--;
 		DBF_DEV_EVENT(DBF_ERR, block->base,
 			      "scan partitions error, retry %d rc %d",
@@ -138,7 +135,7 @@ int dasd_scan_partitions(struct dasd_block *block)
 	 * dasd_generic_set_offline). As long as the partition
 	 * detection is running no offline should be allowed. That
 	 * is why the assignment to device->bdev is done AFTER
-	 * the BLKRRPART ioctl.
+	 * the blkdev_reread_part() call.
 	 */
 	block->bdev = bdev;
 	return 0;
-- 
1.8.3.1




Reply to: