Commit 98f49b63 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

block: remove set_device_ro

Fold set_device_ro into its only remaining caller.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 7a2f0ce1
...@@ -1846,13 +1846,6 @@ static void set_disk_ro_uevent(struct gendisk *gd, int ro) ...@@ -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); 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) void set_disk_ro(struct gendisk *disk, int flag)
{ {
struct disk_part_iter piter; struct disk_part_iter piter;
......
...@@ -371,7 +371,7 @@ static int blkdev_roset(struct block_device *bdev, fmode_t mode, ...@@ -371,7 +371,7 @@ static int blkdev_roset(struct block_device *bdev, fmode_t mode,
if (ret) if (ret)
return ret; return ret;
} }
set_device_ro(bdev, n); bdev->bd_part->policy = n;
return 0; return 0;
} }
......
...@@ -304,7 +304,6 @@ extern void del_gendisk(struct gendisk *gp); ...@@ -304,7 +304,6 @@ extern void del_gendisk(struct gendisk *gp);
extern struct gendisk *get_gendisk(dev_t dev, int *partno); extern struct gendisk *get_gendisk(dev_t dev, int *partno);
extern struct block_device *bdget_disk(struct gendisk *disk, int partno); extern struct block_device *bdget_disk(struct gendisk *disk, int partno);
extern void set_device_ro(struct block_device *bdev, int flag);
extern void set_disk_ro(struct gendisk *disk, int flag); extern void set_disk_ro(struct gendisk *disk, int flag);
static inline int get_disk_ro(struct gendisk *disk) static inline int get_disk_ro(struct gendisk *disk)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment