aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/internal.h
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2012-10-21 19:23:52 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-17 13:14:21 -0800
commit6fbd3cdb9365377e3d0fb5b4c86e16d71678103b (patch)
tree4851ae5cd8dc0426ca9cd97bd078a142f7666a18 /fs/nfs/internal.h
parente4648b149c10256dbc4d4ce5d1c052e733d224f5 (diff)
downloadkernel_samsung_smdk4412-6fbd3cdb9365377e3d0fb5b4c86e16d71678103b.zip
kernel_samsung_smdk4412-6fbd3cdb9365377e3d0fb5b4c86e16d71678103b.tar.gz
kernel_samsung_smdk4412-6fbd3cdb9365377e3d0fb5b4c86e16d71678103b.tar.bz2
nfs: Show original device name verbatim in /proc/*/mount{s,info}
commit 97a54868262da1629a3e65121e65b8e8c4419d9f upstream. Since commit c7f404b ('vfs: new superblock methods to override /proc/*/mount{s,info}'), nfs_path() is used to generate the mounted device name reported back to userland. nfs_path() always generates a trailing slash when the given dentry is the root of an NFS mount, but userland may expect the original device name to be returned verbatim (as it used to be). Make this canonicalisation optional and change the callers accordingly. [jrnieder@gmail.com: use flag instead of bool argument] Reported-and-tested-by: Chris Hiestand <chiestand@salk.edu> Reference: http://bugs.debian.org/669314 Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/nfs/internal.h')
-rw-r--r--fs/nfs/internal.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 4f10d81..399a505 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -274,8 +274,9 @@ extern void nfs_sb_active(struct super_block *sb);
extern void nfs_sb_deactive(struct super_block *sb);
/* namespace.c */
+#define NFS_PATH_CANONICAL 1
extern char *nfs_path(char **p, struct dentry *dentry,
- char *buffer, ssize_t buflen);
+ char *buffer, ssize_t buflen, unsigned flags);
extern struct vfsmount *nfs_d_automount(struct path *path);
/* getroot.c */
@@ -349,7 +350,7 @@ static inline char *nfs_devname(struct dentry *dentry,
char *buffer, ssize_t buflen)
{
char *dummy;
- return nfs_path(&dummy, dentry, buffer, buflen);
+ return nfs_path(&dummy, dentry, buffer, buflen, NFS_PATH_CANONICAL);
}
/*