summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-11-03 13:00:17 +0300
committerJens Axboe <axboe@kernel.dk>2020-11-16 18:14:29 +0300
commit98f49b63e84d4ee1a5c327d0b5f4e8699f6c70fe (patch)
tree28189dec1c4433734a6033c522c9ad89e6c364cc /block
parent7a2f0ce19f2e2ed93b5ace60375b908392ec8afb (diff)
downloadlinux-98f49b63e84d4ee1a5c327d0b5f4e8699f6c70fe.tar.xz
block: remove set_device_ro
Fold set_device_ro into its only remaining caller. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/genhd.c7
-rw-r--r--block/ioctl.c2
2 files changed, 1 insertions, 8 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 9387f050c248..b85db1f2233c 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1846,13 +1846,6 @@ static void set_disk_ro_uevent(struct gendisk *gd, int ro)
kobject_uevent_env(&disk_to_dev(gd)->kobj, KOBJ_CHANGE, envp);
}
-void set_device_ro(struct block_device *bdev, int flag)
-{
- bdev->bd_part->policy = flag;
-}
-
-EXPORT_SYMBOL(set_device_ro);
-
void set_disk_ro(struct gendisk *disk, int flag)
{
struct disk_part_iter piter;
diff --git a/block/ioctl.c b/block/ioctl.c
index 96cb45447364..04255dc5f3bf 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -371,7 +371,7 @@ static int blkdev_roset(struct block_device *bdev, fmode_t mode,
if (ret)
return ret;
}
- set_device_ro(bdev, n);
+ bdev->bd_part->policy = n;
return 0;
}