mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
block: switch ->getgeo() to struct gendisk
Instances are happier that way and it makes more sense anyway - the only part of the result that is related to partition we are given is the start sector, and that has been filled in by the caller. Everything else is a function of the disk. Only one instance (DASD) is ever looking at anything other than bdev->bd_disk and that one is trivial to adjust. Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -481,7 +481,7 @@ static int blkdev_getgeo(struct block_device *bdev,
|
||||
*/
|
||||
memset(&geo, 0, sizeof(geo));
|
||||
geo.start = get_start_sect(bdev);
|
||||
ret = disk->fops->getgeo(bdev, &geo);
|
||||
ret = disk->fops->getgeo(disk, &geo);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (copy_to_user(argp, &geo, sizeof(geo)))
|
||||
@@ -515,7 +515,7 @@ static int compat_hdio_getgeo(struct block_device *bdev,
|
||||
* want to override it.
|
||||
*/
|
||||
geo.start = get_start_sect(bdev);
|
||||
ret = disk->fops->getgeo(bdev, &geo);
|
||||
ret = disk->fops->getgeo(disk, &geo);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user