summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-cache-metadata.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2015-10-22 16:46:59 -0400
committerMike Snitzer <snitzer@redhat.com>2015-10-31 19:06:02 -0400
commit4c7da06f5a780bbf44ebd7547789e48536d0a823 (patch)
treea9d5a178b34760d0aece8afece29c0a11812a79a /drivers/md/dm-cache-metadata.c
parentdbba42d8a9ebddcc1c1412e8457f79f3cb6ef6e7 (diff)
downloadblackbird-op-linux-4c7da06f5a780bbf44ebd7547789e48536d0a823.tar.gz
blackbird-op-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-cache-metadata.c')
-rw-r--r--drivers/md/dm-cache-metadata.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/md/dm-cache-metadata.c b/drivers/md/dm-cache-metadata.c
index 20cc36b01b77..4a6c83e5bc41 100644
--- a/drivers/md/dm-cache-metadata.c
+++ b/drivers/md/dm-cache-metadata.c
@@ -260,7 +260,9 @@ static int __superblock_all_zeroes(struct dm_block_manager *bm, bool *result)
}
}
- return dm_bm_unlock(b);
+ dm_bm_unlock(b);
+
+ return 0;
}
static void __setup_mapping_info(struct dm_cache_metadata *cmd)
@@ -465,7 +467,9 @@ static int __open_metadata(struct dm_cache_metadata *cmd)
dm_disk_bitset_init(cmd->tm, &cmd->discard_info);
sb_flags = le32_to_cpu(disk_super->flags);
cmd->clean_when_opened = test_bit(CLEAN_SHUTDOWN, &sb_flags);
- return dm_bm_unlock(sblock);
+ dm_bm_unlock(sblock);
+
+ return 0;
bad:
dm_bm_unlock(sblock);
OpenPOWER on IntegriCloud