diff options
author | Mike Snitzer <snitzer@kernel.org> | 2022-07-05 14:00:36 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2022-07-07 11:49:33 -0400 |
commit | 2aec377a29250b942f14d3c16d49783da3e9df11 (patch) | |
tree | 6deeee9da1656b677617f7de3ef954e2f2d257cf /drivers/md/dm.c | |
parent | 8b211aaccb915bbf4f4a68f1910c4de701df393b (diff) | |
download | lwn-2aec377a29250b942f14d3c16d49783da3e9df11.tar.gz lwn-2aec377a29250b942f14d3c16d49783da3e9df11.zip |
dm table: remove dm_table_get_num_targets() wrapper
More efficient and readable to just access table->num_targets directly.
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index fa6839141118..44dae3869f29 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -422,7 +422,7 @@ retry: return r; /* We only support devices that have a single target */ - if (dm_table_get_num_targets(map) != 1) + if (map->num_targets != 1) return r; tgt = dm_table_get_target(map, 0); @@ -3092,7 +3092,7 @@ static int dm_call_pr(struct block_device *bdev, iterate_devices_callout_fn fn, goto out; /* We only support devices that have a single target */ - if (dm_table_get_num_targets(table) != 1) + if (table->num_targets != 1) goto out; ti = dm_table_get_target(table, 0); |