nfs: have NFSv3 try server-specified auth flavors in turn
authorJeff Layton <jlayton@redhat.com>
Thu, 27 Jun 2013 19:54:41 +0000 (15:54 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 28 Jun 2013 19:52:37 +0000 (15:52 -0400)
commit9111c95b077a81573fb27df3ba8255d0a3a9ebdf
treec8ae18612cc3c6445f17d12d1860783f532fc175
parentfb9b02fda06798cfca975c8b7fae3e6188a30572
nfs: have NFSv3 try server-specified auth flavors in turn

The current scheme is to try and pick the auth flavor that the server
prefers. In some cases though, we may find that we're not actually
able to use that auth flavor later. For instance, the server may
prefer an AUTH_GSS flavor, but we may not be able to get GSSAPI creds.

The current code just gives up at that point. Change it instead to
try the ->create_server call using each of the different authflavors
in the server's list if one was not specified at mount time. Once
we have a successful ->create_server call, return the result. Only
give up and return error if all attempts fail.

Cc: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/super.c