Skip to content

Commit

Permalink
[PATCH] knfsd: fix nfs4_open lock leak
Browse files Browse the repository at this point in the history
I just noticed that my patch "don't create on open that fails due to
ERR_GRACE" (recently commited as fb553c0)
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: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
J. Bruce Fields authored and Linus Torvalds committed Feb 8, 2006
1 parent 0df420d commit cbd0d51
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fs/nfsd/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cbd0d51

Please sign in to comment.