summaryrefslogtreecommitdiff
path: root/include/linux/genhd.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-08-25 14:56:10 +0400
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 10:56:07 +0400
commitb7db9956e57c8151b930d5e5fe5c766e6aad3ff7 (patch)
treed663a8687fff481abb1498c2ea0eac01ef81cb26 /include/linux/genhd.h
parente56105214943ce5f0901d20e972a7cfd0d1d0656 (diff)
downloadlinux-b7db9956e57c8151b930d5e5fe5c766e6aad3ff7.tar.xz
block: move policy from disk to part0
Move disk->policy to part0->policy. Implement and use get_disk_ro(). Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/genhd.h')
-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);