mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 09:31:14 +00:00
rbd: remove the ->set_read_only method
Now that the hardware read-only state can't be changed by the BLKROSET ioctl, the code in this method is not required anymore. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Acked-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
947139bf3c
commit
cbf72cce63
1 changed files with 0 additions and 19 deletions
|
@ -692,29 +692,10 @@ static void rbd_release(struct gendisk *disk, fmode_t mode)
|
||||||
put_device(&rbd_dev->dev);
|
put_device(&rbd_dev->dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rbd_set_read_only(struct block_device *bdev, bool ro)
|
|
||||||
{
|
|
||||||
struct rbd_device *rbd_dev = bdev->bd_disk->private_data;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Both images mapped read-only and snapshots can't be marked
|
|
||||||
* read-write.
|
|
||||||
*/
|
|
||||||
if (!ro) {
|
|
||||||
if (rbd_is_ro(rbd_dev))
|
|
||||||
return -EROFS;
|
|
||||||
|
|
||||||
rbd_assert(!rbd_is_snap(rbd_dev));
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct block_device_operations rbd_bd_ops = {
|
static const struct block_device_operations rbd_bd_ops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.open = rbd_open,
|
.open = rbd_open,
|
||||||
.release = rbd_release,
|
.release = rbd_release,
|
||||||
.set_read_only = rbd_set_read_only,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue