aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/clntproc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-02-01 12:18:22 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-02-01 12:52:23 -0500
commit16fb24252a8170799e7adf14d8fc31b817fcaf53 (patch)
tree25dee4880572810609ff9905707a75285dfe2770 /fs/lockd/clntproc.c
parent3c3b809e256c417847f1a96b2f9d9f66c7fcb02c (diff)
NLM: Fix arguments to NLM_CANCEL call
The OpenGroup docs state that the arguments "block", "exclusive" and "alock" must exactly match the arguments for the lock call that we are trying to cancel. Currently, "block" is always set to false, which is wrong. See bug# 5956 on bugzilla.kernel.org. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/lockd/clntproc.c')
-rw-r--r--fs/lockd/clntproc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
index 145524039577..b8ecfa1168f3 100644
--- a/fs/lockd/clntproc.c
+++ b/fs/lockd/clntproc.c
@@ -28,6 +28,7 @@ static int nlmclnt_lock(struct nlm_rqst *, struct file_lock *);
28static int nlmclnt_unlock(struct nlm_rqst *, struct file_lock *); 28static int nlmclnt_unlock(struct nlm_rqst *, struct file_lock *);
29static int nlm_stat_to_errno(u32 stat); 29static int nlm_stat_to_errno(u32 stat);
30static void nlmclnt_locks_init_private(struct file_lock *fl, struct nlm_host *host); 30static void nlmclnt_locks_init_private(struct file_lock *fl, struct nlm_host *host);
31static int nlmclnt_cancel(struct nlm_host *, int , struct file_lock *);
31 32
32static const struct rpc_call_ops nlmclnt_unlock_ops; 33static const struct rpc_call_ops nlmclnt_unlock_ops;
33static const struct rpc_call_ops nlmclnt_cancel_ops; 34static const struct rpc_call_ops nlmclnt_cancel_ops;
@@ -598,7 +599,7 @@ out_unblock:
598 nlmclnt_finish_block(req); 599 nlmclnt_finish_block(req);
599 /* Cancel the blocked request if it is still pending */ 600 /* Cancel the blocked request if it is still pending */
600 if (resp->status == NLM_LCK_BLOCKED) 601 if (resp->status == NLM_LCK_BLOCKED)
601 nlmclnt_cancel(host, fl); 602 nlmclnt_cancel(host, req->a_args.block, fl);
602out: 603out:
603 nlmclnt_release_lockargs(req); 604 nlmclnt_release_lockargs(req);
604 return status; 605 return status;
@@ -728,8 +729,7 @@ static const struct rpc_call_ops nlmclnt_unlock_ops = {
728 * We always use an async RPC call for this in order not to hang a 729 * We always use an async RPC call for this in order not to hang a
729 * process that has been Ctrl-C'ed. 730 * process that has been Ctrl-C'ed.
730 */ 731 */
731int 732static int nlmclnt_cancel(struct nlm_host *host, int block, struct file_lock *fl)
732nlmclnt_cancel(struct nlm_host *host, struct file_lock *fl)
733{ 733{
734 struct nlm_rqst *req; 734 struct nlm_rqst *req;
735 unsigned long flags; 735 unsigned long flags;
@@ -750,6 +750,7 @@ nlmclnt_cancel(struct nlm_host *host, struct file_lock *fl)
750 req->a_flags = RPC_TASK_ASYNC; 750 req->a_flags = RPC_TASK_ASYNC;
751 751
752 nlmclnt_setlockargs(req, fl); 752 nlmclnt_setlockargs(req, fl);
753 req->a_args.block = block;
753 754
754 status = nlmclnt_async_call(req, NLMPROC_CANCEL, &nlmclnt_cancel_ops); 755 status = nlmclnt_async_call(req, NLMPROC_CANCEL, &nlmclnt_cancel_ops);
755 if (status < 0) { 756 if (status < 0) {