]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/2.6.32.17/nfsv4-ensure-that-proc-self-mountinfo-displays-the-minor-version-number.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.32.17 / nfsv4-ensure-that-proc-self-mountinfo-displays-the-minor-version-number.patch
CommitLineData
a0402406
GKH
1From 0be8189f2c87fcc747d6a4a657a0b6e2161b2318 Mon Sep 17 00:00:00 2001
2From: Trond Myklebust <Trond.Myklebust@netapp.com>
3Date: Fri, 18 Jun 2010 12:23:58 -0400
4Subject: NFSv4: Ensure that /proc/self/mountinfo displays the minor version number
5
6From: Trond Myklebust <Trond.Myklebust@netapp.com>
7
8commit 0be8189f2c87fcc747d6a4a657a0b6e2161b2318 upstream.
9
10Currently, we do not display the minor version mount parameter in the
11/proc mount info.
12
13Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
14Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15
16---
17 fs/nfs/super.c | 22 ++++++++++++++++++----
18 1 file changed, 18 insertions(+), 4 deletions(-)
19
20--- a/fs/nfs/super.c
21+++ b/fs/nfs/super.c
22@@ -534,6 +534,22 @@ static void nfs_show_mountd_options(stru
23 }
24 }
25
26+#ifdef CONFIG_NFS_V4
27+static void nfs_show_nfsv4_options(struct seq_file *m, struct nfs_server *nfss,
28+ int showdefaults)
29+{
30+ struct nfs_client *clp = nfss->nfs_client;
31+
32+ seq_printf(m, ",clientaddr=%s", clp->cl_ipaddr);
33+ seq_printf(m, ",minorversion=%u", clp->cl_minorversion);
34+}
35+#else
36+static void nfs_show_nfsv4_options(struct seq_file *m, struct nfs_server *nfss,
37+ int showdefaults)
38+{
39+}
40+#endif
41+
42 /*
43 * Describe the mount options in force on this server representation
44 */
45@@ -595,11 +611,9 @@ static void nfs_show_mount_options(struc
46
47 if (version != 4)
48 nfs_show_mountd_options(m, nfss, showdefaults);
49+ else
50+ nfs_show_nfsv4_options(m, nfss, showdefaults);
51
52-#ifdef CONFIG_NFS_V4
53- if (clp->rpc_ops->version == 4)
54- seq_printf(m, ",clientaddr=%s", clp->cl_ipaddr);
55-#endif
56 if (nfss->options & NFS_OPTION_FSCACHE)
57 seq_printf(m, ",fsc");
58 }