diff options
-rw-r--r-- | fs/lockd/clntproc.c | 7 | ||||
-rw-r--r-- | include/linux/lockd/lockd.h | 1 |
2 files changed, 4 insertions, 4 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 *); | |||
28 | static int nlmclnt_unlock(struct nlm_rqst *, struct file_lock *); | 28 | static int nlmclnt_unlock(struct nlm_rqst *, struct file_lock *); |
29 | static int nlm_stat_to_errno(u32 stat); | 29 | static int nlm_stat_to_errno(u32 stat); |
30 | static void nlmclnt_locks_init_private(struct file_lock *fl, struct nlm_host *host); | 30 | static void nlmclnt_locks_init_private(struct file_lock *fl, struct nlm_host *host); |
31 | static int nlmclnt_cancel(struct nlm_host *, int , struct file_lock *); | ||
31 | 32 | ||
32 | static const struct rpc_call_ops nlmclnt_unlock_ops; | 33 | static const struct rpc_call_ops nlmclnt_unlock_ops; |
33 | static const struct rpc_call_ops nlmclnt_cancel_ops; | 34 | static 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); |
602 | out: | 603 | out: |
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 | */ |
731 | int | 732 | static int nlmclnt_cancel(struct nlm_host *host, int block, struct file_lock *fl) |
732 | nlmclnt_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) { |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 95c8fea293ba..afe9a8f5c5ae 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -148,7 +148,6 @@ struct nlm_rqst * nlmclnt_alloc_call(void); | |||
148 | int nlmclnt_prepare_block(struct nlm_rqst *req, struct nlm_host *host, struct file_lock *fl); | 148 | int nlmclnt_prepare_block(struct nlm_rqst *req, struct nlm_host *host, struct file_lock *fl); |
149 | void nlmclnt_finish_block(struct nlm_rqst *req); | 149 | void nlmclnt_finish_block(struct nlm_rqst *req); |
150 | long nlmclnt_block(struct nlm_rqst *req, long timeout); | 150 | long nlmclnt_block(struct nlm_rqst *req, long timeout); |
151 | int nlmclnt_cancel(struct nlm_host *, struct file_lock *); | ||
152 | u32 nlmclnt_grant(struct nlm_lock *); | 151 | u32 nlmclnt_grant(struct nlm_lock *); |
153 | void nlmclnt_recovery(struct nlm_host *, u32); | 152 | void nlmclnt_recovery(struct nlm_host *, u32); |
154 | int nlmclnt_reclaim(struct nlm_host *, struct file_lock *); | 153 | int nlmclnt_reclaim(struct nlm_host *, struct file_lock *); |