diff options
Diffstat (limited to 'drivers/md/dm-snap.c')
-rw-r--r-- | drivers/md/dm-snap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index 1da41229fbf2..854891d07b59 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c | |||
@@ -523,9 +523,12 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
523 | 523 | ||
524 | /* Metadata must only be loaded into one table at once */ | 524 | /* Metadata must only be loaded into one table at once */ |
525 | r = s->store.read_metadata(&s->store); | 525 | r = s->store.read_metadata(&s->store); |
526 | if (r) { | 526 | if (r < 0) { |
527 | ti->error = "Failed to read snapshot metadata"; | 527 | ti->error = "Failed to read snapshot metadata"; |
528 | goto bad6; | 528 | goto bad6; |
529 | } else if (r > 0) { | ||
530 | s->valid = 0; | ||
531 | DMWARN("Snapshot is marked invalid."); | ||
529 | } | 532 | } |
530 | 533 | ||
531 | bio_list_init(&s->queued_bios); | 534 | bio_list_init(&s->queued_bios); |