summaryrefslogtreecommitdiffstats
path: root/fs/sysfs/symlink.c
diff options
context:
space:
mode:
authorTejun Heo2013-11-28 20:54:39 +0100
committerGreg Kroah-Hartman2013-11-30 03:09:27 +0100
commit061447a496b915f1dc8f8c645c6825f856d2bbac (patch)
treece67f6c0ed84ab95594ae3b50fe409e80ca336cf /fs/sysfs/symlink.c
parentsysfs, kernfs: no need to kern_mount() sysfs from sysfs_init() (diff)
downloadkernel-qcow2-linux-061447a496b915f1dc8f8c645c6825f856d2bbac.tar.gz
kernel-qcow2-linux-061447a496b915f1dc8f8c645c6825f856d2bbac.tar.xz
kernel-qcow2-linux-061447a496b915f1dc8f8c645c6825f856d2bbac.zip
sysfs, kernfs: introduce sysfs_root_sd
Currently, it's assumed that there's a single kernfs hierarchy in the system anchored at sysfs_root which is defined as a global struct. To allow other users of kernfs, this will be made dynamic. Introduce a new global variable sysfs_root_sd which points to &sysfs_root and convert all &sysfs_root users. This patch doesn't introduce any behavior difference. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs/symlink.c')
-rw-r--r--fs/sysfs/symlink.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c
index 6797c9c2e43a..62f0e014ec48 100644
--- a/fs/sysfs/symlink.c
+++ b/fs/sysfs/symlink.c
@@ -70,7 +70,7 @@ static int sysfs_do_create_link(struct kobject *kobj, struct kobject *target,
struct sysfs_dirent *parent_sd = NULL;
if (!kobj)
- parent_sd = &sysfs_root;
+ parent_sd = sysfs_root_sd;
else
parent_sd = kobj->sd;
@@ -144,7 +144,7 @@ void sysfs_remove_link(struct kobject *kobj, const char *name)
struct sysfs_dirent *parent_sd = NULL;
if (!kobj)
- parent_sd = &sysfs_root;
+ parent_sd = sysfs_root_sd;
else
parent_sd = kobj->sd;
@@ -170,7 +170,7 @@ int sysfs_rename_link_ns(struct kobject *kobj, struct kobject *targ,
int result;
if (!kobj)
- parent_sd = &sysfs_root;
+ parent_sd = sysfs_root_sd;
else
parent_sd = kobj->sd;