aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/mm/pageattr.c4
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c12
2 files changed, 10 insertions, 6 deletions
diff --git a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c
index c30a16df6440..e8a53552b13d 100644
--- a/arch/i386/mm/pageattr.c
+++ b/arch/i386/mm/pageattr.c
@@ -222,6 +222,10 @@ void kernel_map_pages(struct page *page, int numpages, int enable)
222{ 222{
223 if (PageHighMem(page)) 223 if (PageHighMem(page))
224 return; 224 return;
225 if (!enable)
226 mutex_debug_check_no_locks_freed(page_address(page),
227 page_address(page+numpages));
228
225 /* the return value is ignored - the calls cannot fail, 229 /* the return value is ignored - the calls cannot fail,
226 * large pages are disabled at boot time. 230 * large pages are disabled at boot time.
227 */ 231 */
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}