diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-09 20:31:38 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-09 20:31:38 -0500 |
| commit | 80c0531514516e43ae118ddf38424e06e5c3cb3c (patch) | |
| tree | 2eef8cf8fdf505b18f83078d1eb41167e98f5b54 /fs/sysfs/inode.c | |
| parent | a457aa6c2bdd743bbbffd3f9e4fdbd8c71f8af1b (diff) | |
| parent | 11b751ae8c8ca3fa24c85bd5a3e51dd9f95cda17 (diff) | |
Merge master.kernel.org:/pub/scm/linux/kernel/git/mingo/mutex-2.6
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 | |||
