diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2014-09-02 16:15:26 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-09-03 23:43:04 +0200 |
commit | 027bc41a3eb4759d60641c033c9a4c85be1cfd39 (patch) | |
tree | ad6901388959f1fa9cf2a3c72fe954f23cc98b76 /fs/nfsd/nfsfh.c | |
parent | NFSD: Full checking of authentication name (diff) | |
download | linux-027bc41a3eb4759d60641c033c9a4c85be1cfd39.tar.xz linux-027bc41a3eb4759d60641c033c9a4c85be1cfd39.zip |
NFSD: Put export if prepare_creds() fail
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfsfh.c')
-rw-r--r-- | fs/nfsd/nfsfh.c | 6 |
1 files changed, 4 insertions, 2 deletions
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); |