diff options
author | Jan Blunck <jblunck@suse.de> | 2008-02-14 22:38:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-15 00:17:08 -0500 |
commit | 448678a0f3cdd0157f00e98bd337e32030273637 (patch) | |
tree | 12b4fb7875dd500b1923d3eec316db4c1e1a3692 /arch/powerpc | |
parent | 3dcd25f37cfe2943beca93f41f50994108248a60 (diff) |
d_path: Make get_dcookie() use a struct path argument
get_dcookie() is always called with a dentry and a vfsmount from a struct
path. Make get_dcookie() take it directly as an argument.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Jan Blunck <jblunck@suse.de>
Acked-by: Christoph Hellwig <hch@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/oprofile/cell/spu_task_sync.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/arch/powerpc/oprofile/cell/spu_task_sync.c b/arch/powerpc/oprofile/cell/spu_task_sync.c index 4a890cb42b98..257b13cb18af 100644 --- a/arch/powerpc/oprofile/cell/spu_task_sync.c +++ b/arch/powerpc/oprofile/cell/spu_task_sync.c | |||
@@ -198,14 +198,13 @@ out: | |||
198 | * dcookie user still being registered (namely, the reader | 198 | * dcookie user still being registered (namely, the reader |
199 | * of the event buffer). | 199 | * of the event buffer). |
200 | */ | 200 | */ |
201 | static inline unsigned long fast_get_dcookie(struct dentry *dentry, | 201 | static inline unsigned long fast_get_dcookie(struct path *path) |
202 | struct vfsmount *vfsmnt) | ||
203 | { | 202 | { |
204 | unsigned long cookie; | 203 | unsigned long cookie; |
205 | 204 | ||
206 | if (dentry->d_cookie) | 205 | if (path->dentry->d_cookie) |
207 | return (unsigned long)dentry; | 206 | return (unsigned long)path->dentry; |
208 | get_dcookie(dentry, vfsmnt, &cookie); | 207 | get_dcookie(path, &cookie); |
209 | return cookie; | 208 | return cookie; |
210 | } | 209 | } |
211 | 210 | ||
@@ -240,8 +239,7 @@ get_exec_dcookie_and_offset(struct spu *spu, unsigned int *offsetp, | |||
240 | continue; | 239 | continue; |
241 | if (!(vma->vm_flags & VM_EXECUTABLE)) | 240 | if (!(vma->vm_flags & VM_EXECUTABLE)) |
242 | continue; | 241 | continue; |
243 | app_cookie = fast_get_dcookie(vma->vm_file->f_dentry, | 242 | app_cookie = fast_get_dcookie(&vma->vm_file->f_path); |
244 | vma->vm_file->f_vfsmnt); | ||
245 | pr_debug("got dcookie for %s\n", | 243 | pr_debug("got dcookie for %s\n", |
246 | vma->vm_file->f_dentry->d_name.name); | 244 | vma->vm_file->f_dentry->d_name.name); |
247 | app = vma->vm_file; | 245 | app = vma->vm_file; |
@@ -262,8 +260,7 @@ get_exec_dcookie_and_offset(struct spu *spu, unsigned int *offsetp, | |||
262 | break; | 260 | break; |
263 | } | 261 | } |
264 | 262 | ||
265 | *spu_bin_dcookie = fast_get_dcookie(vma->vm_file->f_dentry, | 263 | *spu_bin_dcookie = fast_get_dcookie(&vma->vm_file->f_path); |
266 | vma->vm_file->f_vfsmnt); | ||
267 | pr_debug("got dcookie for %s\n", vma->vm_file->f_dentry->d_name.name); | 264 | pr_debug("got dcookie for %s\n", vma->vm_file->f_dentry->d_name.name); |
268 | 265 | ||
269 | up_read(&mm->mmap_sem); | 266 | up_read(&mm->mmap_sem); |