From: Kinglong Mee Date: Tue, 2 Sep 2014 14:15:26 +0000 (+0800) Subject: NFSD: Put export if prepare_creds() fail X-Git-Tag: firefly_0821_release~176^2~3115^2~22 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=027bc41a3eb4759d60641c033c9a4c85be1cfd39;p=firefly-linux-kernel-4.4.55.git NFSD: Put export if prepare_creds() fail Signed-off-by: Kinglong Mee Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c index e883a5868be6..88026fc6a981 100644 --- a/fs/nfsd/nfsfh.c +++ b/fs/nfsd/nfsfh.c @@ -209,8 +209,10 @@ static __be32 nfsd_set_fh_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp) * fix that case easily. */ struct cred *new = prepare_creds(); - if (!new) - return nfserrno(-ENOMEM); + if (!new) { + error = nfserrno(-ENOMEM); + goto out; + } new->cap_effective = cap_raise_nfsd_set(new->cap_effective, new->cap_permitted);