Commit cbd0d51a3318583fabf03bccc7a987e158482361
Committed by
Linus Torvalds
1 parent
0df420d8b6
Exists in
master
and in
7 other branches
[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 fb553c0f17444e090db951b96df4d2d71b4f4b6b) 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>
Showing 1 changed file with 4 additions and 2 deletions Side-by-side Diff
fs/nfsd/nfs4proc.c
... | ... | @@ -195,10 +195,12 @@ |
195 | 195 | |
196 | 196 | /* Openowner is now set, so sequence id will get bumped. Now we need |
197 | 197 | * these checks before we do any creates: */ |
198 | + status = nfserr_grace; | |
198 | 199 | if (nfs4_in_grace() && open->op_claim_type != NFS4_OPEN_CLAIM_PREVIOUS) |
199 | - return nfserr_grace; | |
200 | + goto out; | |
201 | + status = nfserr_no_grace; | |
200 | 202 | if (!nfs4_in_grace() && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS) |
201 | - return nfserr_no_grace; | |
203 | + goto out; | |
202 | 204 | |
203 | 205 | switch (open->op_claim_type) { |
204 | 206 | case NFS4_OPEN_CLAIM_DELEGATE_CUR: |