d_path: Make d_path() use a struct path
d_path() is used on a <dentry,vfsmount> pair. Lets use a struct path to reflect this. [akpm@linux-foundation.org: fix build in mm/memory.c] Signed-off-by: Jan Blunck <jblunck@suse.de> Acked-by: Bryan Wu <bryan.wu@analog.com> 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> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
c32c2f63a9
commit
cf28b4863f
@ -206,16 +206,10 @@ static void bitmap_checkfree(struct bitmap *bitmap, unsigned long page)
|
||||
/* copy the pathname of a file to a buffer */
|
||||
char *file_path(struct file *file, char *buf, int count)
|
||||
{
|
||||
struct dentry *d;
|
||||
struct vfsmount *v;
|
||||
|
||||
if (!buf)
|
||||
return NULL;
|
||||
|
||||
d = file->f_path.dentry;
|
||||
v = file->f_path.mnt;
|
||||
|
||||
buf = d_path(d, v, buf, count);
|
||||
buf = d_path(&file->f_path, buf, count);
|
||||
|
||||
return IS_ERR(buf) ? NULL : buf;
|
||||
}
|
||||
|
Reference in New Issue
Block a user