aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorJon Brassow <jbrassow@redhat.com>2009-12-10 18:52:07 -0500
committerAlasdair G Kergon <agk@redhat.com>2009-12-10 18:52:07 -0500
commitf5acc834287dd4f6cf712093ce0e779e38caad70 (patch)
treed3100f28c096a79d487a79b832fa8964af4e2274 /drivers/md
parenta518b86d0b1b6a474f154697dc6f33e0a317ae72 (diff)
dm snapshot: avoid else clause in persistent_read_metadata
Minor code touch-up. We don't need the 'else'. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Reviewed-by: Mikulas Patocka <mpatocka@redhat.com> Reviewed-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-snap-persistent.c46
1 files changed, 21 insertions, 25 deletions
diff --git a/drivers/md/dm-snap-persistent.c b/drivers/md/dm-snap-persistent.c
index 0c746420c008..7e855fbeb22e 100644
--- a/drivers/md/dm-snap-persistent.c
+++ b/drivers/md/dm-snap-persistent.c
@@ -552,35 +552,31 @@ static int persistent_read_metadata(struct dm_exception_store *store,
552 ps->current_area = 0; 552 ps->current_area = 0;
553 zero_memory_area(ps); 553 zero_memory_area(ps);
554 r = zero_disk_area(ps, 0); 554 r = zero_disk_area(ps, 0);
555 if (r) { 555 if (r)
556 DMWARN("zero_disk_area(0) failed"); 556 DMWARN("zero_disk_area(0) failed");
557 return r; 557 return r;
558 } 558 }
559 } else { 559 /*
560 /* 560 * Sanity checks.
561 * Sanity checks. 561 */
562 */ 562 if (ps->version != SNAPSHOT_DISK_VERSION) {
563 if (ps->version != SNAPSHOT_DISK_VERSION) { 563 DMWARN("unable to handle snapshot disk version %d",
564 DMWARN("unable to handle snapshot disk version %d", 564 ps->version);
565 ps->version); 565 return -EINVAL;
566 return -EINVAL; 566 }
567 }
568 567
569 /* 568 /*
570 * Metadata are valid, but snapshot is invalidated 569 * Metadata are valid, but snapshot is invalidated
571 */ 570 */
572 if (!ps->valid) 571 if (!ps->valid)
573 return 1; 572 return 1;
574 573
575 /* 574 /*
576 * Read the metadata. 575 * Read the metadata.
577 */ 576 */
578 r = read_exceptions(ps, callback, callback_context); 577 r = read_exceptions(ps, callback, callback_context);
579 if (r)
580 return r;
581 }
582 578
583 return 0; 579 return r;
584} 580}
585 581
586static int persistent_prepare_exception(struct dm_exception_store *store, 582static int persistent_prepare_exception(struct dm_exception_store *store,