diff options
author | Jes Sorensen <jes@sgi.com> | 2006-01-09 18:59:24 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@hera.kernel.org> | 2006-01-09 18:59:24 -0500 |
commit | 1b1dcc1b57a49136f118a0f16367256ff9994a69 (patch) | |
tree | b0b36d4f41d28c9d6514fb309d33c1a084d6309b /fs/sysfs/inode.c | |
parent | 794ee1baee1c26be40410233e6c20bceb2b03c08 (diff) |
[PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem
This patch converts the inode semaphore to a mutex. I have tested it on
XFS and compiled as much as one can consider on an ia64. Anyway your
luck with it might be different.
Modified-by: Ingo Molnar <mingo@elte.hu>
(finished the conversion)
Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
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 | |||