summaryrefslogtreecommitdiffstats
path: root/fs/nfs/internal.h
diff options
context:
space:
mode:
authorAl Viro2011-03-16 11:26:11 +0100
committerAl Viro2011-03-16 21:47:55 +0100
commitb514f872f86d4b0c13fed74a1fe1f7ab500c4fd0 (patch)
treea54821b3e2363150e4e9b180e097a8092f884dda /fs/nfs/internal.h
parentnfs: store devname at disconnected NFS roots (diff)
downloadkernel-qcow2-linux-b514f872f86d4b0c13fed74a1fe1f7ab500c4fd0.tar.gz
kernel-qcow2-linux-b514f872f86d4b0c13fed74a1fe1f7ab500c4fd0.tar.xz
kernel-qcow2-linux-b514f872f86d4b0c13fed74a1fe1f7ab500c4fd0.zip
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 <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfs/internal.h')
-rw-r--r--fs/nfs/internal.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 9e5a003ccc53..f0234118d044 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -163,10 +163,10 @@ static inline void nfs_fs_proc_exit(void)
/* nfs4namespace.c */
#ifdef CONFIG_NFS_V4
-extern struct vfsmount *nfs_do_refmount(const struct vfsmount *mnt_parent, struct dentry *dentry);
+extern struct vfsmount *nfs_do_refmount(struct super_block *sb, struct dentry *dentry);
#else
static inline
-struct vfsmount *nfs_do_refmount(const struct vfsmount *mnt_parent, struct dentry *dentry)
+struct vfsmount *nfs_do_refmount(struct super_block *sb, struct dentry *dentry)
{
return ERR_PTR(-ENOENT);
}
@@ -247,9 +247,7 @@ extern void nfs_sb_active(struct super_block *sb);
extern void nfs_sb_deactive(struct super_block *sb);
/* namespace.c */
-extern char *nfs_path(const char *base,
- const struct dentry *droot,
- const struct dentry *dentry,
+extern char *nfs_path(char **p, struct dentry *dentry,
char *buffer, ssize_t buflen);
extern struct vfsmount *nfs_d_automount(struct path *path);
@@ -290,12 +288,11 @@ extern int _nfs4_call_sync_session(struct nfs_server *server,
/*
* Determine the device name as a string
*/
-static inline char *nfs_devname(const struct vfsmount *mnt_parent,
- const struct dentry *dentry,
+static inline char *nfs_devname(struct dentry *dentry,
char *buffer, ssize_t buflen)
{
- return nfs_path(mnt_parent->mnt_devname, mnt_parent->mnt_root,
- dentry, buffer, buflen);
+ char *dummy;
+ return nfs_path(&dummy, dentry, buffer, buflen);
}
/*