]> Pileus Git - ~andy/linux/blobdiff - fs/nfs/mount_clnt.c
Merge tag 'iommu-updates-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git...
[~andy/linux] / fs / nfs / mount_clnt.c
index 91a6faf811accb8e8e35ab6c3644e16058356a2a..99a45283b9ee5abfe2bb680c51c2b4805f459d2b 100644 (file)
@@ -139,7 +139,10 @@ struct mnt_fhstatus {
  * nfs_mount - Obtain an NFS file handle for the given host and path
  * @info: pointer to mount request arguments
  *
- * Uses default timeout parameters specified by underlying transport.
+ * Uses default timeout parameters specified by underlying transport. On
+ * successful return, the auth_flavs list and auth_flav_len will be populated
+ * with the list from the server or a faked-up list if the server didn't
+ * provide one.
  */
 int nfs_mount(struct nfs_mount_request *info)
 {
@@ -195,6 +198,15 @@ int nfs_mount(struct nfs_mount_request *info)
        dprintk("NFS: MNT request succeeded\n");
        status = 0;
 
+       /*
+        * If the server didn't provide a flavor list, allow the
+        * client to try any flavor.
+        */
+       if (info->version != NFS_MNT3_VERSION || *info->auth_flav_len == 0) {
+               dprintk("NFS: Faking up auth_flavs list\n");
+               info->auth_flavs[0] = RPC_AUTH_NULL;
+               *info->auth_flav_len = 1;
+       }
 out:
        return status;