Commit 57bbe3d7 authored by Andy Adamson's avatar Andy Adamson Committed by Trond Myklebust

NFS check the return of nfs4_negotiate_security in nfs4_submount

Signed-off-by: default avatarAndy Adamson <andros@netapp.com>
Tested-By: default avatarSteve Dickson <steved@redhat.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 6edf9609
...@@ -399,8 +399,11 @@ struct vfsmount *nfs4_submount(struct nfs_server *server, struct dentry *dentry, ...@@ -399,8 +399,11 @@ struct vfsmount *nfs4_submount(struct nfs_server *server, struct dentry *dentry,
flavor = client->cl_auth->au_flavor; flavor = client->cl_auth->au_flavor;
else { else {
rpc_authflavor_t new = nfs4_negotiate_security(dir, name); rpc_authflavor_t new = nfs4_negotiate_security(dir, name);
if ((int)new >= 0) if ((int)new < 0) {
flavor = new; mnt = ERR_PTR((int)new);
goto out;
}
flavor = new;
} }
mnt = nfs_do_submount(dentry, fh, fattr, flavor); mnt = nfs_do_submount(dentry, fh, fattr, flavor);
out: out:
......
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