Commit 78b19bae authored by Weston Andros Adamson's avatar Weston Andros Adamson Committed by Trond Myklebust

nfs4.1: properly handle ENOTSUP in SECINFO_NO_NAME

Don't check for -NFS4ERR_NOTSUPP, it's already been mapped to -ENOTSUPP
by nfs4_stat_to_errno.

This allows the client to mount v4.1 servers that don't support
SECINFO_NO_NAME by falling back to the "guess and check" method of
nfs4_find_root_sec.
Signed-off-by: default avatarWeston Andros Adamson <dros@primarydata.com>
Cc: stable@vger.kernel.org # 3.1+
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 71244d9b
...@@ -7919,7 +7919,7 @@ nfs41_proc_secinfo_no_name(struct nfs_server *server, struct nfs_fh *fhandle, ...@@ -7919,7 +7919,7 @@ nfs41_proc_secinfo_no_name(struct nfs_server *server, struct nfs_fh *fhandle,
switch (err) { switch (err) {
case 0: case 0:
case -NFS4ERR_WRONGSEC: case -NFS4ERR_WRONGSEC:
case -NFS4ERR_NOTSUPP: case -ENOTSUPP:
goto out; goto out;
default: default:
err = nfs4_handle_exception(server, err, &exception); err = nfs4_handle_exception(server, err, &exception);
...@@ -7953,7 +7953,7 @@ nfs41_find_root_sec(struct nfs_server *server, struct nfs_fh *fhandle, ...@@ -7953,7 +7953,7 @@ nfs41_find_root_sec(struct nfs_server *server, struct nfs_fh *fhandle,
* Fall back on "guess and check" method if * Fall back on "guess and check" method if
* the server doesn't support SECINFO_NO_NAME * the server doesn't support SECINFO_NO_NAME
*/ */
if (err == -NFS4ERR_WRONGSEC || err == -NFS4ERR_NOTSUPP) { if (err == -NFS4ERR_WRONGSEC || err == -ENOTSUPP) {
err = nfs4_find_root_sec(server, fhandle, info); err = nfs4_find_root_sec(server, fhandle, info);
goto out_freepage; goto out_freepage;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment