aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-snap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-snap.c')
-rw-r--r--drivers/md/dm-snap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index fdde53cd12b..a2d330942cb 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;