diff options
-rw-r--r-- | drivers/md/dm-log.c | 2 | ||||
-rw-r--r-- | drivers/md/dm-snap.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c index 6951536ea29c..8e8a868ca857 100644 --- a/drivers/md/dm-log.c +++ b/drivers/md/dm-log.c | |||
@@ -543,7 +543,7 @@ static int disk_ctr(struct dm_dirty_log *log, struct dm_target *ti, | |||
543 | return -EINVAL; | 543 | return -EINVAL; |
544 | } | 544 | } |
545 | 545 | ||
546 | r = dm_get_device(ti, argv[0], FMODE_READ | FMODE_WRITE, &dev); | 546 | r = dm_get_device(ti, argv[0], dm_table_get_mode(ti->table), &dev); |
547 | if (r) | 547 | if (r) |
548 | return r; | 548 | return r; |
549 | 549 | ||
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index fdde53cd12b7..a2d330942cb2 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c | |||
@@ -1080,7 +1080,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
1080 | argv++; | 1080 | argv++; |
1081 | argc--; | 1081 | argc--; |
1082 | 1082 | ||
1083 | r = dm_get_device(ti, cow_path, FMODE_READ | FMODE_WRITE, &s->cow); | 1083 | r = dm_get_device(ti, cow_path, dm_table_get_mode(ti->table), &s->cow); |
1084 | if (r) { | 1084 | if (r) { |
1085 | ti->error = "Cannot get COW device"; | 1085 | ti->error = "Cannot get COW device"; |
1086 | goto bad_cow; | 1086 | goto bad_cow; |