Merge branch 'mount.part1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[platform/kernel/linux-rpi.git] / fs / nfs / super.c
index 073eec2..22ce3c8 100644 (file)
@@ -2152,7 +2152,10 @@ static int nfs_validate_text_mount_data(void *options,
 
        if (args->version == 4) {
 #if IS_ENABLED(CONFIG_NFS_V4)
-               port = NFS_PORT;
+               if (args->nfs_server.protocol == XPRT_TRANSPORT_RDMA)
+                       port = NFS_RDMA_PORT;
+               else
+                       port = NFS_PORT;
                max_namelen = NFS4_MAXNAMLEN;
                max_pathlen = NFS4_MAXPATHLEN;
                nfs_validate_transport_protocol(args);
@@ -2162,8 +2165,11 @@ static int nfs_validate_text_mount_data(void *options,
 #else
                goto out_v4_not_compiled;
 #endif /* CONFIG_NFS_V4 */
-       } else
+       } else {
                nfs_set_mount_transport_protocol(args);
+               if (args->nfs_server.protocol == XPRT_TRANSPORT_RDMA)
+                       port = NFS_RDMA_PORT;
+       }
 
        nfs_set_port(sap, &args->nfs_server.port, port);
 
@@ -2395,8 +2401,7 @@ static int nfs_compare_mount_options(const struct super_block *s, const struct n
                goto Ebusy;
        if (a->acdirmax != b->acdirmax)
                goto Ebusy;
-       if (b->auth_info.flavor_len > 0 &&
-          clnt_a->cl_auth->au_flavor != clnt_b->cl_auth->au_flavor)
+       if (clnt_a->cl_auth->au_flavor != clnt_b->cl_auth->au_flavor)
                goto Ebusy;
        return 1;
 Ebusy: