提交 027bc41a 编写于 作者: K Kinglong Mee 提交者: J. Bruce Fields

NFSD: Put export if prepare_creds() fail

Signed-off-by: NKinglong Mee <kinglongmee@gmail.com>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 13c82e8e
...@@ -209,8 +209,10 @@ static __be32 nfsd_set_fh_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp) ...@@ -209,8 +209,10 @@ static __be32 nfsd_set_fh_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp)
* fix that case easily. * fix that case easily.
*/ */
struct cred *new = prepare_creds(); struct cred *new = prepare_creds();
if (!new) if (!new) {
return nfserrno(-ENOMEM); error = nfserrno(-ENOMEM);
goto out;
}
new->cap_effective = new->cap_effective =
cap_raise_nfsd_set(new->cap_effective, cap_raise_nfsd_set(new->cap_effective,
new->cap_permitted); new->cap_permitted);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册