aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs/symlink.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2008-04-22 07:34:25 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2008-04-22 07:34:25 -0400
commitf838bad1b3be8ca0c785ee0e0c570dfda74cf377 (patch)
tree5a842a8056a708cfad55a20fa8ab733dd94b0903 /fs/sysfs/symlink.c
parentdd919660aacdf4adfcd279556aa03e595f7f0fc2 (diff)
parent807501475fce0ebe68baedf87f202c3e4ee0d12c (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/sysfs/symlink.c')
-rw-r--r--fs/sysfs/symlink.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c
index 5f66c4466151..817f5966edca 100644
--- a/fs/sysfs/symlink.c
+++ b/fs/sysfs/symlink.c
@@ -87,7 +87,14 @@ int sysfs_create_link(struct kobject * kobj, struct kobject * target, const char
87 87
88void sysfs_remove_link(struct kobject * kobj, const char * name) 88void sysfs_remove_link(struct kobject * kobj, const char * name)
89{ 89{
90 sysfs_hash_and_remove(kobj->sd, name); 90 struct sysfs_dirent *parent_sd = NULL;
91
92 if (!kobj)
93 parent_sd = &sysfs_root;
94 else
95 parent_sd = kobj->sd;
96
97 sysfs_hash_and_remove(parent_sd, name);
91} 98}
92 99
93static int sysfs_get_target_path(struct sysfs_dirent *parent_sd, 100static int sysfs_get_target_path(struct sysfs_dirent *parent_sd,