NFS: Fix /proc/mount for legacy binary interface
[deliverable/linux.git] / fs / nfs / super.c
index 04214fc5c30457ea290a2a15e0f87a5f184aea65..f1ae39f6cb023a187edc8bba9b87707457734e07 100644 (file)
@@ -546,6 +546,9 @@ static void nfs_show_mountd_options(struct seq_file *m, struct nfs_server *nfss,
 {
        struct sockaddr *sap = (struct sockaddr *)&nfss->mountd_address;
 
+       if (nfss->flags & NFS_MOUNT_LEGACY_INTERFACE)
+               return;
+
        switch (sap->sa_family) {
        case AF_INET: {
                struct sockaddr_in *sin = (struct sockaddr_in *)sap;
@@ -570,6 +573,22 @@ static void nfs_show_mountd_options(struct seq_file *m, struct nfs_server *nfss,
        nfs_show_mountd_netid(m, nfss, showdefaults);
 }
 
+#ifdef CONFIG_NFS_V4
+static void nfs_show_nfsv4_options(struct seq_file *m, struct nfs_server *nfss,
+                                   int showdefaults)
+{
+       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,
+                                   int showdefaults)
+{
+}
+#endif
+
 /*
  * Describe the mount options in force on this server representation
  */
@@ -631,11 +650,9 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss,
 
        if (version != 4)
                nfs_show_mountd_options(m, nfss, showdefaults);
+       else
+               nfs_show_nfsv4_options(m, nfss, showdefaults);
 
-#ifdef CONFIG_NFS_V4
-       if (clp->rpc_ops->version == 4)
-               seq_printf(m, ",clientaddr=%s", clp->cl_ipaddr);
-#endif
        if (nfss->options & NFS_OPTION_FSCACHE)
                seq_printf(m, ",fsc");
 }
@@ -1766,6 +1783,7 @@ static int nfs_validate_mount_data(void *options,
                 * can deal with.
                 */
                args->flags             = data->flags & NFS_MOUNT_FLAGMASK;
+               args->flags             |= NFS_MOUNT_LEGACY_INTERFACE;
                args->rsize             = data->rsize;
                args->wsize             = data->wsize;
                args->timeo             = data->timeo;
This page took 0.028472 seconds and 5 git commands to generate.