[PATCH 09/11] landlock: use sb_for_each_inodes API
Ye Bin
yebin at huaweicloud.com
Mon Nov 18 11:45:06 UTC 2024
From: Ye Bin <yebin10 at huawei.com>
Use sb_for_each_inodes API foreach super_block->s_inodes.
Signed-off-by: Ye Bin <yebin10 at huawei.com>
---
security/landlock/fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/landlock/fs.c b/security/landlock/fs.c
index dd9a7297ea4e..ccb7951f1404 100644
--- a/security/landlock/fs.c
+++ b/security/landlock/fs.c
@@ -1217,7 +1217,7 @@ static void hook_sb_delete(struct super_block *const sb)
return;
spin_lock(&sb->s_inode_list_lock);
- list_for_each_entry(inode, &sb->s_inodes, i_sb_list) {
+ sb_for_each_inodes(inode, &sb->s_inodes) {
struct landlock_object *object;
/* Only handles referenced inodes. */
--
2.34.1
More information about the Linux-security-module-archive
mailing list