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 /arch/powerpc/platforms/cell | |
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 'arch/powerpc/platforms/cell')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/inode.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 1f3507c75e90..d2ba358c6e38 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -137,7 +137,7 @@ spufs_delete_inode(struct inode *inode) | |||
137 | static void spufs_prune_dir(struct dentry *dir) | 137 | static void spufs_prune_dir(struct dentry *dir) |
138 | { | 138 | { |
139 | struct dentry *dentry, *tmp; | 139 | struct dentry *dentry, *tmp; |
140 | down(&dir->d_inode->i_sem); | 140 | mutex_lock(&dir->d_inode->i_mutex); |
141 | list_for_each_entry_safe(dentry, tmp, &dir->d_subdirs, d_child) { | 141 | list_for_each_entry_safe(dentry, tmp, &dir->d_subdirs, d_child) { |
142 | spin_lock(&dcache_lock); | 142 | spin_lock(&dcache_lock); |
143 | spin_lock(&dentry->d_lock); | 143 | spin_lock(&dentry->d_lock); |
@@ -154,7 +154,7 @@ static void spufs_prune_dir(struct dentry *dir) | |||
154 | } | 154 | } |
155 | } | 155 | } |
156 | shrink_dcache_parent(dir); | 156 | shrink_dcache_parent(dir); |
157 | up(&dir->d_inode->i_sem); | 157 | mutex_unlock(&dir->d_inode->i_mutex); |
158 | } | 158 | } |
159 | 159 | ||
160 | static int spufs_rmdir(struct inode *root, struct dentry *dir_dentry) | 160 | static int spufs_rmdir(struct inode *root, struct dentry *dir_dentry) |
@@ -162,15 +162,15 @@ static int spufs_rmdir(struct inode *root, struct dentry *dir_dentry) | |||
162 | struct spu_context *ctx; | 162 | struct spu_context *ctx; |
163 | 163 | ||
164 | /* remove all entries */ | 164 | /* remove all entries */ |
165 | down(&root->i_sem); | 165 | mutex_lock(&root->i_mutex); |
166 | spufs_prune_dir(dir_dentry); | 166 | spufs_prune_dir(dir_dentry); |
167 | up(&root->i_sem); | 167 | mutex_unlock(&root->i_mutex); |
168 | 168 | ||
169 | /* We have to give up the mm_struct */ | 169 | /* We have to give up the mm_struct */ |
170 | ctx = SPUFS_I(dir_dentry->d_inode)->i_ctx; | 170 | ctx = SPUFS_I(dir_dentry->d_inode)->i_ctx; |
171 | spu_forget(ctx); | 171 | spu_forget(ctx); |
172 | 172 | ||
173 | /* XXX Do we need to hold i_sem here ? */ | 173 | /* XXX Do we need to hold i_mutex here ? */ |
174 | return simple_rmdir(root, dir_dentry); | 174 | return simple_rmdir(root, dir_dentry); |
175 | } | 175 | } |
176 | 176 | ||
@@ -330,7 +330,7 @@ long spufs_create_thread(struct nameidata *nd, | |||
330 | out_dput: | 330 | out_dput: |
331 | dput(dentry); | 331 | dput(dentry); |
332 | out_dir: | 332 | out_dir: |
333 | up(&nd->dentry->d_inode->i_sem); | 333 | mutex_unlock(&nd->dentry->d_inode->i_mutex); |
334 | out: | 334 | out: |
335 | return ret; | 335 | return ret; |
336 | } | 336 | } |