summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
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;
}