summaryrefslogtreecommitdiff
path: root/fs/sysfs
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-02-22 10:07:13 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-02-23 17:46:34 +0300
commitf2eb478f2f322217aa642e11c1cc011f99c797e6 (patch)
treef71c2db5e8a403e2f397c6a5fcaa9556e559e1fa /fs/sysfs
parentb4ae8c2fb673d2fc60cb8fe645dba4f4db8b0dab (diff)
downloadlinux-f2eb478f2f322217aa642e11c1cc011f99c797e6.tar.xz
kernfs: move struct kernfs_root out of the public view.
There is no need to have struct kernfs_root be part of kernfs.h for the whole kernel to see and poke around it. Move it internal to kernfs code and provide a helper function, kernfs_root_to_node(), to handle the one field that kernfs users were directly accessing from the structure. Cc: Imran Khan <imran.f.khan@oracle.com> Acked-by: Tejun Heo <tj@kernel.org> Link: https://lore.kernel.org/r/20220222070713.3517679-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs')
-rw-r--r--fs/sysfs/mount.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
index e747c135c1d1..98467bb76737 100644
--- a/fs/sysfs/mount.c
+++ b/fs/sysfs/mount.c
@@ -103,7 +103,7 @@ int __init sysfs_init(void)
if (IS_ERR(sysfs_root))
return PTR_ERR(sysfs_root);
- sysfs_root_kn = sysfs_root->kn;
+ sysfs_root_kn = kernfs_root_to_node(sysfs_root);
err = register_filesystem(&sysfs_fs_type);
if (err) {