summaryrefslogtreecommitdiff
path: root/drivers/md/dm-ima.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@kernel.org>2022-07-05 21:00:36 +0300
committerMike Snitzer <snitzer@kernel.org>2022-07-07 18:49:33 +0300
commit2aec377a29250b942f14d3c16d49783da3e9df11 (patch)
tree6deeee9da1656b677617f7de3ef954e2f2d257cf /drivers/md/dm-ima.c
parent8b211aaccb915bbf4f4a68f1910c4de701df393b (diff)
downloadlinux-2aec377a29250b942f14d3c16d49783da3e9df11.tar.xz
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-ima.c')
-rw-r--r--drivers/md/dm-ima.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-ima.c b/drivers/md/dm-ima.c
index 1842d3a958ef..3c15c069947f 100644
--- a/drivers/md/dm-ima.c
+++ b/drivers/md/dm-ima.c
@@ -208,7 +208,7 @@ void dm_ima_measure_on_table_load(struct dm_table *table, unsigned int status_fl
if (!target_data_buf)
goto error;
- num_targets = dm_table_get_num_targets(table);
+ num_targets = table->num_targets;
if (dm_ima_alloc_and_copy_device_data(table->md, &device_data_buf, num_targets, noio))
goto error;