aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-09 20:31:38 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-09 20:31:38 -0500
commit80c0531514516e43ae118ddf38424e06e5c3cb3c (patch)
tree2eef8cf8fdf505b18f83078d1eb41167e98f5b54 /arch/powerpc
parenta457aa6c2bdd743bbbffd3f9e4fdbd8c71f8af1b (diff)
parent11b751ae8c8ca3fa24c85bd5a3e51dd9f95cda17 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/mingo/mutex-2.6
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c12
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)
137static void spufs_prune_dir(struct dentry *dir) 137static 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
160static int spufs_rmdir(struct inode *root, struct dentry *dir_dentry) 160static 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,
330out_dput: 330out_dput:
331 dput(dentry); 331 dput(dentry);
332out_dir: 332out_dir:
333 up(&nd->dentry->d_inode->i_sem); 333 mutex_unlock(&nd->dentry->d_inode->i_mutex);
334out: 334out:
335 return ret; 335 return ret;
336} 336}