summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-era-target.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2015-10-22 22:46:59 +0200
committerMike Snitzer <snitzer@redhat.com>2015-11-01 00:06:02 +0100
commit4c7da06f5a780bbf44ebd7547789e48536d0a823 (patch)
treea9d5a178b34760d0aece8afece29c0a11812a79a /drivers/md/dm-era-target.c
parentdm: eliminate unused "bioset" process for each bio-based DM device (diff)
downloadlinux-4c7da06f5a780bbf44ebd7547789e48536d0a823.tar.xz
linux-4c7da06f5a780bbf44ebd7547789e48536d0a823.zip
dm persistent data: eliminate unnecessary return values
dm_bm_unlock and dm_tm_unlock return an integer value but the returned value is always 0. The calling code sometimes checks the return value and sometimes doesn't. Eliminate these unnecessary return values and also the checks for them. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-era-target.c')
-rw-r--r--drivers/md/dm-era-target.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/md/dm-era-target.c b/drivers/md/dm-era-target.c
index 0119ebfb3d49..665bf3285618 100644
--- a/drivers/md/dm-era-target.c
+++ b/drivers/md/dm-era-target.c
@@ -343,7 +343,9 @@ static int superblock_all_zeroes(struct dm_block_manager *bm, bool *result)
}
}
- return dm_bm_unlock(b);
+ dm_bm_unlock(b);
+
+ return 0;
}
/*----------------------------------------------------------------*/
@@ -582,7 +584,9 @@ static int open_metadata(struct era_metadata *md)
md->metadata_snap = le64_to_cpu(disk->metadata_snap);
md->archived_writesets = true;
- return dm_bm_unlock(sblock);
+ dm_bm_unlock(sblock);
+
+ return 0;
bad:
dm_bm_unlock(sblock);
@@ -1046,12 +1050,7 @@ static int metadata_take_snap(struct era_metadata *md)
md->metadata_snap = dm_block_location(clone);
- r = dm_tm_unlock(md->tm, clone);
- if (r) {
- DMERR("%s: couldn't unlock clone", __func__);
- md->metadata_snap = SUPERBLOCK_LOCATION;
- return r;
- }
+ dm_tm_unlock(md->tm, clone);
return 0;
}