Skip to content

Commit

Permalink
NFSD: Put export if prepare_creds() fail
Browse files Browse the repository at this point in the history
Signed-off-by: Kinglong Mee <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
  • Loading branch information
kinglongmee authored and J. Bruce Fields committed Sep 3, 2014
1 parent 13c82e8 commit 027bc41
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fs/nfsd/nfsfh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 027bc41

Please sign in to comment.