aboutsummaryrefslogtreecommitdiffstats
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 {
145 struct kobject *slave_dir; 145 struct kobject *slave_dir;
146 146
147 struct timer_rand_state *random; 147 struct timer_rand_state *random;
148 int policy;
149 148
150 atomic_t sync_io; /* RAID */ 149 atomic_t sync_io; /* RAID */
151 unsigned long stamp; 150 unsigned long stamp;
@@ -403,6 +402,11 @@ extern struct block_device *bdget_disk(struct gendisk *disk, int partno);
403extern void set_device_ro(struct block_device *bdev, int flag); 402extern void set_device_ro(struct block_device *bdev, int flag);
404extern void set_disk_ro(struct gendisk *disk, int flag); 403extern void set_disk_ro(struct gendisk *disk, int flag);
405 404
405static inline int get_disk_ro(struct gendisk *disk)
406{
407 return disk->part0.policy;
408}
409
406/* drivers/char/random.c */ 410/* drivers/char/random.c */
407extern void add_disk_randomness(struct gendisk *disk); 411extern void add_disk_randomness(struct gendisk *disk);
408extern void rand_initialize_disk(struct gendisk *disk); 412extern void rand_initialize_disk(struct gendisk *disk);