aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4namespace.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2014-06-09 15:33:19 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-06-24 18:46:57 -0400
commit57bbe3d7c110fcc20a661cb814a401e4126ca590 (patch)
tree649a416fd687f3340a5b4b59edcf088b3874113b /fs/nfs/nfs4namespace.c
parent6edf96097b1df34fcd332f7ee4ba120fbc1d16c3 (diff)
NFS check the return of nfs4_negotiate_security in nfs4_submount
Signed-off-by: Andy Adamson <andros@netapp.com> Tested-By: Steve Dickson <steved@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/nfs4namespace.c')
-rw-r--r--fs/nfs/nfs4namespace.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/nfs/nfs4namespace.c b/fs/nfs/nfs4namespace.c
index 3d5dbf80d46a..1b86fef0b828 100644
--- a/fs/nfs/nfs4namespace.c
+++ b/fs/nfs/nfs4namespace.c
@@ -399,8 +399,11 @@ struct vfsmount *nfs4_submount(struct nfs_server *server, struct dentry *dentry,
399 flavor = client->cl_auth->au_flavor; 399 flavor = client->cl_auth->au_flavor;
400 else { 400 else {
401 rpc_authflavor_t new = nfs4_negotiate_security(dir, name); 401 rpc_authflavor_t new = nfs4_negotiate_security(dir, name);
402 if ((int)new >= 0) 402 if ((int)new < 0) {
403 flavor = new; 403 mnt = ERR_PTR((int)new);
404 goto out;
405 }
406 flavor = new;
404 } 407 }
405 mnt = nfs_do_submount(dentry, fh, fattr, flavor); 408 mnt = nfs_do_submount(dentry, fh, fattr, flavor);
406out: 409out: