You need to sign in or sign up before continuing.
提交 cbd0d51a 编写于 作者: J J. Bruce Fields 提交者: Linus Torvalds

[PATCH] knfsd: fix nfs4_open lock leak

I just noticed that my patch "don't create on open that fails due to
ERR_GRACE" (recently commited as fb553c0f)
had an obvious problem that causes a deadlock on reboot recovery.  Sending
in this now since it seems like a clear 2.6.16 candidate.--b.

We're returning with a lock held in some error cases.
Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: NNeil Brown <neilb@suse.de>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 0df420d8
......@@ -195,10 +195,12 @@ nfsd4_open(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open
/* Openowner is now set, so sequence id will get bumped. Now we need
* these checks before we do any creates: */
status = nfserr_grace;
if (nfs4_in_grace() && open->op_claim_type != NFS4_OPEN_CLAIM_PREVIOUS)
return nfserr_grace;
goto out;
status = nfserr_no_grace;
if (!nfs4_in_grace() && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS)
return nfserr_no_grace;
goto out;
switch (open->op_claim_type) {
case NFS4_OPEN_CLAIM_DELEGATE_CUR:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册