summaryrefslogtreecommitdiff
path: root/drivers/md/dm-cache-target.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2020-09-19 20:36:58 +0300
committerMike Snitzer <snitzer@redhat.com>2020-09-29 23:33:08 +0300
commitd4a512edcc65704c5df51909caeab0495ba0ced3 (patch)
tree85abcd54756cdc73fb1c48a74cce54bedbac209a /drivers/md/dm-cache-target.c
parent33bd6f0693857492ab19869d79801437ac1e42ba (diff)
downloadlinux-d4a512edcc65704c5df51909caeab0495ba0ced3.tar.xz
dm: use dm_table_get_device_name() where appropriate in targets
dm_table_get_device_name() avoids calling dm_table_get_md() followed by dm_device_name() -- saves intermediate dm_table_get_md() call. Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-cache-target.c')
-rw-r--r--drivers/md/dm-cache-target.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index 96c93802ee4d..9644424591da 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -925,7 +925,7 @@ static enum cache_metadata_mode get_cache_mode(struct cache *cache)
static const char *cache_device_name(struct cache *cache)
{
- return dm_device_name(dm_table_get_md(cache->ti->table));
+ return dm_table_device_name(cache->ti->table);
}
static void notify_mode_switch(struct cache *cache, enum cache_metadata_mode mode)