aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs/symlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/sysfs/symlink.c')
-rw-r--r--fs/sysfs/symlink.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c
index de402fa915f2..e38d6338a20d 100644
--- a/fs/sysfs/symlink.c
+++ b/fs/sysfs/symlink.c
@@ -86,9 +86,9 @@ int sysfs_create_link(struct kobject * kobj, struct kobject * target, const char
86 86
87 BUG_ON(!kobj || !kobj->dentry || !name); 87 BUG_ON(!kobj || !kobj->dentry || !name);
88 88
89 down(&dentry->d_inode->i_sem); 89 mutex_lock(&dentry->d_inode->i_mutex);
90 error = sysfs_add_link(dentry, name, target); 90 error = sysfs_add_link(dentry, name, target);
91 up(&dentry->d_inode->i_sem); 91 mutex_unlock(&dentry->d_inode->i_mutex);
92 return error; 92 return error;
93} 93}
94 94
@@ -177,4 +177,3 @@ struct inode_operations sysfs_symlink_inode_operations = {
177 177
178EXPORT_SYMBOL_GPL(sysfs_create_link); 178EXPORT_SYMBOL_GPL(sysfs_create_link);
179EXPORT_SYMBOL_GPL(sysfs_remove_link); 179EXPORT_SYMBOL_GPL(sysfs_remove_link);
180