diff options
Diffstat (limited to 'fs/sysfs/inode.c')
-rw-r--r-- | fs/sysfs/inode.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index 970a33f03299..c3133219941c 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c | |||
@@ -201,7 +201,7 @@ const unsigned char * sysfs_get_name(struct sysfs_dirent *sd) | |||
201 | 201 | ||
202 | /* | 202 | /* |
203 | * Unhashes the dentry corresponding to given sysfs_dirent | 203 | * Unhashes the dentry corresponding to given sysfs_dirent |
204 | * Called with parent inode's i_sem held. | 204 | * Called with parent inode's i_mutex held. |
205 | */ | 205 | */ |
206 | void sysfs_drop_dentry(struct sysfs_dirent * sd, struct dentry * parent) | 206 | void sysfs_drop_dentry(struct sysfs_dirent * sd, struct dentry * parent) |
207 | { | 207 | { |
@@ -232,7 +232,7 @@ void sysfs_hash_and_remove(struct dentry * dir, const char * name) | |||
232 | /* no inode means this hasn't been made visible yet */ | 232 | /* no inode means this hasn't been made visible yet */ |
233 | return; | 233 | return; |
234 | 234 | ||
235 | down(&dir->d_inode->i_sem); | 235 | mutex_lock(&dir->d_inode->i_mutex); |
236 | list_for_each_entry(sd, &parent_sd->s_children, s_sibling) { | 236 | list_for_each_entry(sd, &parent_sd->s_children, s_sibling) { |
237 | if (!sd->s_element) | 237 | if (!sd->s_element) |
238 | continue; | 238 | continue; |
@@ -243,7 +243,5 @@ void sysfs_hash_and_remove(struct dentry * dir, const char * name) | |||
243 | break; | 243 | break; |
244 | } | 244 | } |
245 | } | 245 | } |
246 | up(&dir->d_inode->i_sem); | 246 | mutex_unlock(&dir->d_inode->i_mutex); |
247 | } | 247 | } |
248 | |||
249 | |||