diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-06-18 12:23:58 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-06-22 13:22:53 -0400 |
commit | 0be8189f2c87fcc747d6a4a657a0b6e2161b2318 (patch) | |
tree | f0f461bfa5cef075c7045e5ff216b261ed894098 /fs/nfs | |
parent | 44950b67a6239b377a9e6fd52c498b310bcdd713 (diff) |
NFSv4: Ensure that /proc/self/mountinfo displays the minor version number
Currently, we do not display the minor version mount parameter in the
/proc mount info.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@kernel.org
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/super.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 04214fc5c304..f9df16de4a56 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -570,6 +570,22 @@ static void nfs_show_mountd_options(struct seq_file *m, struct nfs_server *nfss, | |||
570 | nfs_show_mountd_netid(m, nfss, showdefaults); | 570 | nfs_show_mountd_netid(m, nfss, showdefaults); |
571 | } | 571 | } |
572 | 572 | ||
573 | #ifdef CONFIG_NFS_V4 | ||
574 | static void nfs_show_nfsv4_options(struct seq_file *m, struct nfs_server *nfss, | ||
575 | int showdefaults) | ||
576 | { | ||
577 | struct nfs_client *clp = nfss->nfs_client; | ||
578 | |||
579 | seq_printf(m, ",clientaddr=%s", clp->cl_ipaddr); | ||
580 | seq_printf(m, ",minorversion=%u", clp->cl_minorversion); | ||
581 | } | ||
582 | #else | ||
583 | static void nfs_show_nfsv4_options(struct seq_file *m, struct nfs_server *nfss, | ||
584 | int showdefaults) | ||
585 | { | ||
586 | } | ||
587 | #endif | ||
588 | |||
573 | /* | 589 | /* |
574 | * Describe the mount options in force on this server representation | 590 | * Describe the mount options in force on this server representation |
575 | */ | 591 | */ |
@@ -631,11 +647,9 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss, | |||
631 | 647 | ||
632 | if (version != 4) | 648 | if (version != 4) |
633 | nfs_show_mountd_options(m, nfss, showdefaults); | 649 | nfs_show_mountd_options(m, nfss, showdefaults); |
650 | else | ||
651 | nfs_show_nfsv4_options(m, nfss, showdefaults); | ||
634 | 652 | ||
635 | #ifdef CONFIG_NFS_V4 | ||
636 | if (clp->rpc_ops->version == 4) | ||
637 | seq_printf(m, ",clientaddr=%s", clp->cl_ipaddr); | ||
638 | #endif | ||
639 | if (nfss->options & NFS_OPTION_FSCACHE) | 653 | if (nfss->options & NFS_OPTION_FSCACHE) |
640 | seq_printf(m, ",fsc"); | 654 | seq_printf(m, ",fsc"); |
641 | } | 655 | } |