aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/compat_ioctl.c2
-rw-r--r--fs/dcache.c12
-rw-r--r--fs/dcookies.c2
-rw-r--r--fs/nfsd/export.c2
-rw-r--r--fs/proc/base.c2
-rw-r--r--fs/seq_file.c3
6 files changed, 10 insertions, 13 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index ee32c0eac7c..c6e72aebd16 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -2853,7 +2853,7 @@ static void compat_ioctl_error(struct file *filp, unsigned int fd,
/* find the name of the device. */
path = (char *)__get_free_page(GFP_KERNEL);
if (path) {
- fn = d_path(filp->f_path.dentry, filp->f_path.mnt, path, PAGE_SIZE);
+ fn = d_path(&filp->f_path, path, PAGE_SIZE);
if (IS_ERR(fn))
fn = "?";
}
diff --git a/fs/dcache.c b/fs/dcache.c
index 170efbcb1a9..7b4b080219f 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1845,8 +1845,7 @@ Elong:
/**
* d_path - return the path of a dentry
- * @dentry: dentry to report
- * @vfsmnt: vfsmnt to which the dentry belongs
+ * @path: path to report
* @buf: buffer to return value in
* @buflen: buffer length
*
@@ -1857,8 +1856,7 @@ Elong:
*
* "buflen" should be positive. Caller holds the dcache_lock.
*/
-char *d_path(struct dentry *dentry, struct vfsmount *vfsmnt,
- char *buf, int buflen)
+char *d_path(struct path *path, char *buf, int buflen)
{
char *res;
struct path root;
@@ -1870,15 +1868,15 @@ char *d_path(struct dentry *dentry, struct vfsmount *vfsmnt,
* user wants to identify the object in /proc/pid/fd/. The little hack
* below allows us to generate a name for these objects on demand:
*/
- if (dentry->d_op && dentry->d_op->d_dname)
- return dentry->d_op->d_dname(dentry, buf, buflen);
+ if (path->dentry->d_op && path->dentry->d_op->d_dname)
+ return path->dentry->d_op->d_dname(path->dentry, buf, buflen);
read_lock(&current->fs->lock);
root = current->fs->root;
path_get(&current->fs->root);
read_unlock(&current->fs->lock);
spin_lock(&dcache_lock);
- res = __d_path(dentry, vfsmnt, &root, buf, buflen);
+ res = __d_path(path->dentry, path->mnt, &root, buf, buflen);
spin_unlock(&dcache_lock);
path_put(&root);
return res;
diff --git a/fs/dcookies.c b/fs/dcookies.c
index 13c29f1f711..855d4b1d619 100644
--- a/fs/dcookies.c
+++ b/fs/dcookies.c
@@ -171,7 +171,7 @@ asmlinkage long sys_lookup_dcookie(u64 cookie64, char __user * buf, size_t len)
goto out;
/* FIXME: (deleted) ? */
- path = d_path(dcs->path.dentry, dcs->path.mnt, kbuf, PAGE_SIZE);
+ path = d_path(&dcs->path, kbuf, PAGE_SIZE);
if (IS_ERR(path)) {
err = PTR_ERR(path);
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 4a85b40eef4..8a6f7c924c7 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -345,7 +345,7 @@ static void svc_export_request(struct cache_detail *cd,
char *pth;
qword_add(bpp, blen, exp->ex_client->name);
- pth = d_path(exp->ex_path.dentry, exp->ex_path.mnt, *bpp, *blen);
+ pth = d_path(&exp->ex_path, *bpp, *blen);
if (IS_ERR(pth)) {
/* is this correct? */
(*bpp)[0] = '\n';
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 47338d92db5..88f8edf1825 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1185,7 +1185,7 @@ static int do_proc_readlink(struct path *path, char __user *buffer, int buflen)
if (!tmp)
return -ENOMEM;
- pathname = d_path(path->dentry, path->mnt, tmp, PAGE_SIZE);
+ pathname = d_path(path, tmp, PAGE_SIZE);
len = PTR_ERR(pathname);
if (IS_ERR(pathname))
goto out;
diff --git a/fs/seq_file.c b/fs/seq_file.c
index 8d862907f06..853770274f2 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -346,8 +346,7 @@ int seq_path(struct seq_file *m, struct path *path, char *esc)
{
if (m->count < m->size) {
char *s = m->buf + m->count;
- char *p = d_path(path->dentry, path->mnt, s,
- m->size - m->count);
+ char *p = d_path(path, s, m->size - m->count);
if (!IS_ERR(p)) {
while (s <= p) {
char c = *p++;