@@ -982,13 +982,13 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv)
}
/* cross reference snapshots that will do handover */
+ down_write(&dup->lock);
dup->handover_snap = s;
+ up_write(&dup->lock);
s->handover_snap = dup;
+
/* this new snapshot will accept the handover */
s->handover = 1;
- } else if (is_merge(ti)) {
- ti->error = "Unable to find snapshot that is to be merged";
- goto bad_load_and_register;
}
/* Metadata must only be loaded into one table at once */