summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2026-05-12 01:25:48 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2026-06-08 14:53:09 -0400
commitcbd6bbd48732987de51e8a6d4917875daa636079 (patch)
tree29a0b23303256d31fb37b1ae80a765e2aa76a2b8
parent764682e0118432260191d194edbdaff208260483 (diff)
downloadlinux-cbd6bbd48732987de51e8a6d4917875daa636079.tar.gz
linux-cbd6bbd48732987de51e8a6d4917875daa636079.zip
configfs_do_depend_item(): pass configfs_dirent instead of dentry
Again, the only thing it uses the argument for is its ->d_fsdata and callers already have that - as the matter of fact, they are passing ->s_dentry of that configfs_dirent, so that the function could get it back as ->d_fsdata of that. With nothing else in dentry even looked at... configfs_dirent in question is a directory one - in this case those are subdirectories of root (aka roots of "subsystem" trees). Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/configfs/dir.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c
index a6b99bcbddbc..c6055a626bef 100644
--- a/fs/configfs/dir.c
+++ b/fs/configfs/dir.c
@@ -1119,7 +1119,7 @@ out:
return ret;
}
-static int configfs_do_depend_item(struct dentry *subsys_dentry,
+static int configfs_do_depend_item(struct configfs_dirent *subsys_sd,
struct config_item *target)
{
struct configfs_dirent *p;
@@ -1127,7 +1127,7 @@ static int configfs_do_depend_item(struct dentry *subsys_dentry,
spin_lock(&configfs_dirent_lock);
/* Scan the tree, return 0 if found */
- ret = configfs_depend_prep(subsys_dentry->d_fsdata, target);
+ ret = configfs_depend_prep(subsys_sd, target);
if (ret)
goto out_unlock_dirent_lock;
@@ -1195,7 +1195,7 @@ int configfs_depend_item(struct configfs_subsystem *subsys,
}
/* Ok, now we can trust subsys/s_item */
- ret = configfs_do_depend_item(subsys_sd->s_dentry, target);
+ ret = configfs_do_depend_item(subsys_sd, target);
out_unlock_fs:
inode_unlock(d_inode(root));
@@ -1297,7 +1297,7 @@ int configfs_depend_item_unlocked(struct configfs_subsystem *caller_subsys,
}
/* Now we can execute core of depend item */
- ret = configfs_do_depend_item(subsys_sd->s_dentry, target);
+ ret = configfs_do_depend_item(subsys_sd, target);
if (target_subsys != caller_subsys)
out_root_unlock: