diff options
author | Tejun Heo <tj@kernel.org> | 2008-08-25 06:56:10 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 02:56:07 -0400 |
commit | b7db9956e57c8151b930d5e5fe5c766e6aad3ff7 (patch) | |
tree | d663a8687fff481abb1498c2ea0eac01ef81cb26 /drivers | |
parent | e56105214943ce5f0901d20e972a7cfd0d1d0656 (diff) |
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 'drivers')
-rw-r--r-- | drivers/ide/ide-cd.c | 2 | ||||
-rw-r--r-- | drivers/md/dm-ioctl.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index f16bb4667238..03c2cb6a58bc 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -1113,7 +1113,7 @@ static ide_startstop_t cdrom_start_rw(ide_drive_t *drive, struct request *rq) | |||
1113 | 1113 | ||
1114 | if (write) { | 1114 | if (write) { |
1115 | /* disk has become write protected */ | 1115 | /* disk has become write protected */ |
1116 | if (cd->disk->policy) { | 1116 | if (get_disk_ro(cd->disk)) { |
1117 | cdrom_end_request(drive, 0); | 1117 | cdrom_end_request(drive, 0); |
1118 | return ide_stopped; | 1118 | return ide_stopped; |
1119 | } | 1119 | } |
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index c3de311117a1..5b919159f084 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c | |||
@@ -548,7 +548,7 @@ static int __dev_status(struct mapped_device *md, struct dm_ioctl *param) | |||
548 | */ | 548 | */ |
549 | param->open_count = dm_open_count(md); | 549 | param->open_count = dm_open_count(md); |
550 | 550 | ||
551 | if (disk->policy) | 551 | if (get_disk_ro(disk)) |
552 | param->flags |= DM_READONLY_FLAG; | 552 | param->flags |= DM_READONLY_FLAG; |
553 | 553 | ||
554 | param->event_nr = dm_get_event_nr(md); | 554 | param->event_nr = dm_get_event_nr(md); |