diff options
Diffstat (limited to 'fs/lockd/svclock.c')
-rw-r--r-- | fs/lockd/svclock.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index 49f959796b66..87d09a0d8f64 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c | |||
@@ -41,7 +41,8 @@ | |||
41 | 41 | ||
42 | static void nlmsvc_insert_block(struct nlm_block *block, unsigned long); | 42 | static void nlmsvc_insert_block(struct nlm_block *block, unsigned long); |
43 | static int nlmsvc_remove_block(struct nlm_block *block); | 43 | static int nlmsvc_remove_block(struct nlm_block *block); |
44 | static void nlmsvc_grant_callback(struct rpc_task *task); | 44 | |
45 | static const struct rpc_call_ops nlmsvc_grant_ops; | ||
45 | 46 | ||
46 | /* | 47 | /* |
47 | * The list of blocked locks to retry | 48 | * The list of blocked locks to retry |
@@ -562,7 +563,7 @@ callback: | |||
562 | /* Call the client */ | 563 | /* Call the client */ |
563 | nlm_get_host(block->b_call.a_host); | 564 | nlm_get_host(block->b_call.a_host); |
564 | if (nlmsvc_async_call(&block->b_call, NLMPROC_GRANTED_MSG, | 565 | if (nlmsvc_async_call(&block->b_call, NLMPROC_GRANTED_MSG, |
565 | nlmsvc_grant_callback) < 0) | 566 | &nlmsvc_grant_ops) < 0) |
566 | nlm_release_host(block->b_call.a_host); | 567 | nlm_release_host(block->b_call.a_host); |
567 | up(&file->f_sema); | 568 | up(&file->f_sema); |
568 | } | 569 | } |
@@ -575,10 +576,9 @@ callback: | |||
575 | * chain once more in order to have it removed by lockd itself (which can | 576 | * chain once more in order to have it removed by lockd itself (which can |
576 | * then sleep on the file semaphore without disrupting e.g. the nfs client). | 577 | * then sleep on the file semaphore without disrupting e.g. the nfs client). |
577 | */ | 578 | */ |
578 | static void | 579 | static void nlmsvc_grant_callback(struct rpc_task *task, void *data) |
579 | nlmsvc_grant_callback(struct rpc_task *task) | ||
580 | { | 580 | { |
581 | struct nlm_rqst *call = (struct nlm_rqst *) task->tk_calldata; | 581 | struct nlm_rqst *call = data; |
582 | struct nlm_block *block; | 582 | struct nlm_block *block; |
583 | unsigned long timeout; | 583 | unsigned long timeout; |
584 | struct sockaddr_in *peer_addr = RPC_PEERADDR(task->tk_client); | 584 | struct sockaddr_in *peer_addr = RPC_PEERADDR(task->tk_client); |
@@ -614,6 +614,10 @@ nlmsvc_grant_callback(struct rpc_task *task) | |||
614 | nlm_release_host(call->a_host); | 614 | nlm_release_host(call->a_host); |
615 | } | 615 | } |
616 | 616 | ||
617 | static const struct rpc_call_ops nlmsvc_grant_ops = { | ||
618 | .rpc_call_done = nlmsvc_grant_callback, | ||
619 | }; | ||
620 | |||
617 | /* | 621 | /* |
618 | * We received a GRANT_RES callback. Try to find the corresponding | 622 | * We received a GRANT_RES callback. Try to find the corresponding |
619 | * block. | 623 | * block. |