summaryrefslogtreecommitdiffstats
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-02 14:00:20 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-02 14:00:20 -0500
commit7bbceb6f2bdda67054bc66035a9543623e539126 (patch)
tree901a46726fcadbef13611926b699a6f5752a1397 /fs/nfs/super.c
parent0d71b058092fc98cfef8e8f6d913180a10a55397 (diff)
downloadlinux-7bbceb6f2bdda67054bc66035a9543623e539126.tar.bz2
NFS: Ensure we display the minor version correctly in /proc/mounts etc.
The 'minorversion' mount option is now deprecated, so we need to display the minor version number in the 'vers=' format. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index ab58bb9b6115..7f0c93f8afe3 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -640,7 +640,6 @@ static void nfs_show_nfsv4_options(struct seq_file *m, struct nfs_server *nfss,
struct nfs_client *clp = nfss->nfs_client;
seq_printf(m, ",clientaddr=%s", clp->cl_ipaddr);
- seq_printf(m, ",minorversion=%u", clp->cl_minorversion);
}
#else
static void nfs_show_nfsv4_options(struct seq_file *m, struct nfs_server *nfss,
@@ -649,6 +648,15 @@ static void nfs_show_nfsv4_options(struct seq_file *m, struct nfs_server *nfss,
}
#endif
+static void nfs_show_nfs_version(struct seq_file *m,
+ unsigned int version,
+ unsigned int minorversion)
+{
+ seq_printf(m, ",vers=%u", version);
+ if (version == 4)
+ seq_printf(m, ".%u", minorversion);
+}
+
/*
* Describe the mount options in force on this server representation
*/
@@ -676,7 +684,7 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss,
u32 version = clp->rpc_ops->version;
int local_flock, local_fcntl;
- seq_printf(m, ",vers=%u", version);
+ nfs_show_nfs_version(m, version, clp->cl_minorversion);
seq_printf(m, ",rsize=%u", nfss->rsize);
seq_printf(m, ",wsize=%u", nfss->wsize);
if (nfss->bsize != 0)