aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 170efbcb1a9b..7b4b080219f8 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1845,8 +1845,7 @@ Elong:
1845 1845
1846/** 1846/**
1847 * d_path - return the path of a dentry 1847 * d_path - return the path of a dentry
1848 * @dentry: dentry to report 1848 * @path: path to report
1849 * @vfsmnt: vfsmnt to which the dentry belongs
1850 * @buf: buffer to return value in 1849 * @buf: buffer to return value in
1851 * @buflen: buffer length 1850 * @buflen: buffer length
1852 * 1851 *
@@ -1857,8 +1856,7 @@ Elong:
1857 * 1856 *
1858 * "buflen" should be positive. Caller holds the dcache_lock. 1857 * "buflen" should be positive. Caller holds the dcache_lock.
1859 */ 1858 */
1860char *d_path(struct dentry *dentry, struct vfsmount *vfsmnt, 1859char *d_path(struct path *path, char *buf, int buflen)
1861 char *buf, int buflen)
1862{ 1860{
1863 char *res; 1861 char *res;
1864 struct path root; 1862 struct path root;
@@ -1870,15 +1868,15 @@ char *d_path(struct dentry *dentry, struct vfsmount *vfsmnt,
1870 * user wants to identify the object in /proc/pid/fd/. The little hack 1868 * user wants to identify the object in /proc/pid/fd/. The little hack
1871 * below allows us to generate a name for these objects on demand: 1869 * below allows us to generate a name for these objects on demand:
1872 */ 1870 */
1873 if (dentry->d_op && dentry->d_op->d_dname) 1871 if (path->dentry->d_op && path->dentry->d_op->d_dname)
1874 return dentry->d_op->d_dname(dentry, buf, buflen); 1872 return path->dentry->d_op->d_dname(path->dentry, buf, buflen);
1875 1873
1876 read_lock(&current->fs->lock); 1874 read_lock(&current->fs->lock);
1877 root = current->fs->root; 1875 root = current->fs->root;
1878 path_get(&current->fs->root); 1876 path_get(&current->fs->root);
1879 read_unlock(&current->fs->lock); 1877 read_unlock(&current->fs->lock);
1880 spin_lock(&dcache_lock); 1878 spin_lock(&dcache_lock);
1881 res = __d_path(dentry, vfsmnt, &root, buf, buflen); 1879 res = __d_path(path->dentry, path->mnt, &root, buf, buflen);
1882 spin_unlock(&dcache_lock); 1880 spin_unlock(&dcache_lock);
1883 path_put(&root); 1881 path_put(&root);
1884 return res; 1882 return res;