Skip to content

Commit 27603a6

Browse files
Matthias Kaehlckekees
authored andcommitted
dm: verity-loadpin: Drop use of dm_table_get_num_targets()
Commit 2aec377 ("dm table: remove dm_table_get_num_targets() wrapper") in linux-dm/for-next removed the function dm_table_get_num_targets() which is used by verity-loadpin. Access table->num_targets directly instead of using the defunct wrapper. Fixes: b6c1c57 ("dm: Add verity helpers for LoadPin") Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Matthias Kaehlcke <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/20220728085412.1.I242d21b378410eb6f9897a3160efb56e5608c59d@changeid
1 parent aaf50b1 commit 27603a6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/md/dm-verity-loadpin.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <linux/dm-verity-loadpin.h>
66

77
#include "dm.h"
8+
#include "dm-core.h"
89
#include "dm-verity.h"
910

1011
#define DM_MSG_PREFIX "verity-loadpin"
@@ -58,7 +59,7 @@ bool dm_verity_loadpin_is_bdev_trusted(struct block_device *bdev)
5859

5960
table = dm_get_live_table(md, &srcu_idx);
6061

61-
if (dm_table_get_num_targets(table) != 1)
62+
if (table->num_targets != 1)
6263
goto out;
6364

6465
ti = dm_table_get_target(table, 0);

0 commit comments

Comments
 (0)