diff options
| author | Nathan Scott <nathans@bruce> | 2006-03-22 15:31:14 +1100 |
|---|---|---|
| committer | Nathan Scott <nathans@bruce> | 2006-03-22 15:31:14 +1100 |
| commit | 4d74f423c722b8cadfabe087369200013b217b67 (patch) | |
| tree | d62facddfdb0dfd89f3e61f4fc699cf2feb4b082 /fs/lockd/clntproc.c | |
| parent | bb19fba1937cb6ab2bb98ac893365f6ebf88ef1b (diff) | |
| parent | e952f31bce6e9f64db01f607abc46529ba57ac9e (diff) | |
Merge HEAD from ../linux-2.6
Diffstat (limited to 'fs/lockd/clntproc.c')
| -rw-r--r-- | fs/lockd/clntproc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c index 220058d8616d..970b6a6aa337 100644 --- a/fs/lockd/clntproc.c +++ b/fs/lockd/clntproc.c @@ -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); @@ -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; |
