aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs/symlink.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-06-13 15:27:23 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-11 19:09:08 -0400
commit5f9953237f684ea1778adb9d26162da00b282225 (patch)
tree962bbe5fe2483876caa74943875cbef432db6945 /fs/sysfs/symlink.c
parent608e266a2d4e62c1b98c1c573064b6afe8c06a58 (diff)
sysfs: consolidate sysfs spinlocks
Replace sysfs_lock and kobj_sysfs_assoc_lock with sysfs_assoc_lock. sysfs_lock was originally to be used to protect sysfs_dirent tree but mutex seems better choice, so there is no reason to keep sysfs_lock separate. Merge the two spinlocks into one. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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 43cc5222f136..cbd95a4109de 100644
--- a/fs/sysfs/symlink.c
+++ b/fs/sysfs/symlink.c
@@ -82,12 +82,12 @@ int sysfs_create_link(struct kobject * kobj, struct kobject * target, const char
82 return -EFAULT; 82 return -EFAULT;
83 83
84 /* target->sd can go away beneath us but is protected with 84 /* target->sd can go away beneath us but is protected with
85 * kobj_sysfs_assoc_lock. Fetch target_sd from it. 85 * sysfs_assoc_lock. Fetch target_sd from it.
86 */ 86 */
87 spin_lock(&kobj_sysfs_assoc_lock); 87 spin_lock(&sysfs_assoc_lock);
88 if (target->sd) 88 if (target->sd)
89 target_sd = sysfs_get(target->sd); 89 target_sd = sysfs_get(target->sd);
90 spin_unlock(&kobj_sysfs_assoc_lock); 90 spin_unlock(&sysfs_assoc_lock);
91 91
92 if (!target_sd) 92 if (!target_sd)
93 return -ENOENT; 93 return -ENOENT;