From b514f872f86d4b0c13fed74a1fe1f7ab500c4fd0 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 16 Mar 2011 06:26:11 -0400 Subject: nfs: make nfs_path() work without vfsmount part 3: now we have everything to get nfs_path() just by dentry - just follow to (disconnected) root and pick the rest of the thing there. Start killing propagation of struct vfsmount * on the paths that used to bring it to nfs_path(). Signed-off-by: Al Viro --- fs/nfs/super.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'fs/nfs/super.c') diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 1d81032b226a..a6ab483c9ad0 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -2771,16 +2771,15 @@ static struct vfsmount *nfs_do_root_mount(struct file_system_type *fs_type, return root_mnt; } -static void nfs_fix_devname(const struct path *path, struct vfsmount *mnt) +static void nfs_fix_devname(struct dentry *dentry, struct vfsmount *mnt) { char *page = (char *) __get_free_page(GFP_KERNEL); char *devname, *tmp; + char *dummy; if (page == NULL) return; - devname = nfs_path(path->mnt->mnt_devname, - path->mnt->mnt_root, path->dentry, - page, PAGE_SIZE); + devname = nfs_path(&dummy, dentry, page, PAGE_SIZE); if (IS_ERR(devname)) goto out_freepage; tmp = kstrdup(devname, GFP_KERNEL); @@ -2894,7 +2893,7 @@ static int nfs_follow_remote_path(struct vfsmount *root_mnt, mnt_target->mnt_root = dget(nd->path.dentry); /* Correct the device pathname */ - nfs_fix_devname(&nd->path, mnt_target); + nfs_fix_devname(nd->path.dentry, mnt_target); path_put(&nd->path); kfree(nd); -- cgit v1.2.3