Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21033
b: refs/heads/master
c: 30f4e20
h: refs/heads/master
i:
  21031: 9a792e4
v: v3
  • Loading branch information
Trond Myklebust authored and Linus Torvalds committed Mar 14, 2006
1 parent 96e7ad2 commit 81abfa9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e6d83d55698b73b4d5d55d3d7715a4c26030d577
refs/heads/master: 30f4e20a0d3492668f5065af582b5af2d1e4256b
9 changes: 7 additions & 2 deletions trunk/fs/lockd/clntproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,12 +662,18 @@ nlmclnt_unlock(struct nlm_rqst *req, struct file_lock *fl)
* reclaimed while we're stuck in the unlock call. */
fl->fl_u.nfs_fl.flags &= ~NFS_LCK_GRANTED;

/*
* Note: the server is supposed to either grant us the unlock
* request, or to deny it with NLM_LCK_DENIED_GRACE_PERIOD. In either
* case, we want to unlock.
*/
do_vfs_lock(fl);

if (req->a_flags & RPC_TASK_ASYNC) {
status = nlmclnt_async_call(req, NLMPROC_UNLOCK,
&nlmclnt_unlock_ops);
/* Hrmf... Do the unlock early since locks_remove_posix()
* really expects us to free the lock synchronously */
do_vfs_lock(fl);
if (status < 0) {
nlmclnt_release_lockargs(req);
kfree(req);
Expand All @@ -680,7 +686,6 @@ nlmclnt_unlock(struct nlm_rqst *req, struct file_lock *fl)
if (status < 0)
return status;

do_vfs_lock(fl);
if (resp->status == NLM_LCK_GRANTED)
return 0;

Expand Down

0 comments on commit 81abfa9

Please sign in to comment.