block: dasd_genhd: convert to blkdev_reread_part

Also remove the obsolete comment.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Jarod Wilson <jarod@redhat.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Acked-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
Ming Lei 2015-05-06 12:26:26 +08:00 committed by Jens Axboe
parent 9dcd137953
commit 6029a06c88

View File

@ -116,14 +116,11 @@ int dasd_scan_partitions(struct dasd_block *block)
rc); rc);
return -ENODEV; return -ENODEV;
} }
/*
* See fs/partition/check.c:register_disk,rescan_partitions rc = blkdev_reread_part(bdev);
* Can't call rescan_partitions directly. Use ioctl.
*/
rc = ioctl_by_bdev(bdev, BLKRRPART, 0);
while (rc == -EBUSY && retry > 0) { while (rc == -EBUSY && retry > 0) {
schedule(); schedule();
rc = ioctl_by_bdev(bdev, BLKRRPART, 0); rc = blkdev_reread_part(bdev);
retry--; 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, retry %d rc %d",