diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2014-09-02 22:15:26 +0800 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-09-03 17:43:04 -0400 |
commit | 027bc41a3eb4759d60641c033c9a4c85be1cfd39 (patch) | |
tree | ad6901388959f1fa9cf2a3c72fe954f23cc98b76 /fs/nfsd/nfsfh.c | |
parent | 13c82e8eb515ea84de4e3a1a097137bd3d5c2cc5 (diff) | |
download | op-kernel-dev-027bc41a3eb4759d60641c033c9a4c85be1cfd39.zip op-kernel-dev-027bc41a3eb4759d60641c033c9a4c85be1cfd39.tar.gz |
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 e883a58..88026fc 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); |