Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

One less parameter to __d_path

All callers to __d_path pass the dentry and vfsmount of a struct path to
__d_path. Pass the struct path directly, instead.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
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>

authored by

Jan Blunck and committed by
Linus Torvalds
329c97f0 ac748a09

+5 -7
+5 -7
fs/dcache.c
··· 1776 1776 * 1777 1777 * "buflen" should be positive. Caller holds the dcache_lock. 1778 1778 */ 1779 - static char * __d_path( struct dentry *dentry, struct vfsmount *vfsmnt, 1780 - struct dentry *root, struct vfsmount *rootmnt, 1781 - char *buffer, int buflen) 1779 + static char *__d_path(struct dentry *dentry, struct vfsmount *vfsmnt, 1780 + struct path *root, char *buffer, int buflen) 1782 1781 { 1783 1782 char * end = buffer+buflen; 1784 1783 char * retval; ··· 1802 1803 for (;;) { 1803 1804 struct dentry * parent; 1804 1805 1805 - if (dentry == root && vfsmnt == rootmnt) 1806 + if (dentry == root->dentry && vfsmnt == root->mnt) 1806 1807 break; 1807 1808 if (dentry == vfsmnt->mnt_root || IS_ROOT(dentry)) { 1808 1809 /* Global root? */ ··· 1865 1866 path_get(&current->fs->root); 1866 1867 read_unlock(&current->fs->lock); 1867 1868 spin_lock(&dcache_lock); 1868 - res = __d_path(dentry, vfsmnt, root.dentry, root.mnt, buf, buflen); 1869 + res = __d_path(dentry, vfsmnt, &root, buf, buflen); 1869 1870 spin_unlock(&dcache_lock); 1870 1871 path_put(&root); 1871 1872 return res; ··· 1933 1934 unsigned long len; 1934 1935 char * cwd; 1935 1936 1936 - cwd = __d_path(pwd.dentry, pwd.mnt, root.dentry, root.mnt, 1937 - page, PAGE_SIZE); 1937 + cwd = __d_path(pwd.dentry, pwd.mnt, &root, page, PAGE_SIZE); 1938 1938 spin_unlock(&dcache_lock); 1939 1939 1940 1940 error = PTR_ERR(cwd);