diff options
| author | Adrian Bunk <bunk@r063144.stusta.swh.mhn.de> | 2006-03-20 20:30:36 +0300 | 
|---|---|---|
| committer | Adrian Bunk <bunk@r063144.stusta.swh.mhn.de> | 2006-03-20 20:30:36 +0300 | 
| commit | 0f76ee451484d02c7405d92e7bceb39b415abb01 (patch) | |
| tree | 9722f84281f786ba48971dde057f5171a49969e4 /fs/lockd/clntproc.c | |
| parent | 01d206a7c1167639f6ca6dac22140fbdca017558 (diff) | |
| parent | 7705a8792b0fc82fd7d4dd923724606bbfd9fb20 (diff) | |
| download | linux-0f76ee451484d02c7405d92e7bceb39b415abb01.tar.xz | |
Merge with git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
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;  | 
