summaryrefslogtreecommitdiff
path: root/fs/nfsd/nfsfh.c
diff options
context:
space:
mode:
authorKinglong Mee <kinglongmee@gmail.com>2014-09-02 18:15:26 +0400
committerJ. Bruce Fields <bfields@redhat.com>2014-09-04 01:43:04 +0400
commit027bc41a3eb4759d60641c033c9a4c85be1cfd39 (patch)
treead6901388959f1fa9cf2a3c72fe954f23cc98b76 /fs/nfsd/nfsfh.c
parent13c82e8eb515ea84de4e3a1a097137bd3d5c2cc5 (diff)
downloadlinux-027bc41a3eb4759d60641c033c9a4c85be1cfd39.tar.xz
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.c6
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);