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 /arch | |
parent | a457aa6c2bdd743bbbffd3f9e4fdbd8c71f8af1b (diff) | |
parent | 11b751ae8c8ca3fa24c85bd5a3e51dd9f95cda17 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/mingo/mutex-2.6
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/mm/pageattr.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/inode.c | 12 |
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) | |||
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 | } |