summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/genhd.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 9cb8380cf0eb..4411bdd671dd 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -145,7 +145,6 @@ struct gendisk {
struct kobject *slave_dir;
struct timer_rand_state *random;
- int policy;
atomic_t sync_io; /* RAID */
unsigned long stamp;
@@ -403,6 +402,11 @@ 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);
+static inline int get_disk_ro(struct gendisk *disk)
+{
+ return disk->part0.policy;
+}
+
/* drivers/char/random.c */
extern void add_disk_randomness(struct gendisk *disk);
extern void rand_initialize_disk(struct gendisk *disk);