diff options
-rw-r--r-- | include/linux/sunrpc/clnt.h | 1 | ||||
-rw-r--r-- | include/linux/sunrpc/sched.h | 1 | ||||
-rw-r--r-- | net/sunrpc/clnt.c | 13 | ||||
-rw-r--r-- | net/sunrpc/sched.c | 2 |
4 files changed, 16 insertions, 1 deletions
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index c39a21040dcb..37881f1a0bd7 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -143,6 +143,7 @@ int rpc_call_sync(struct rpc_clnt *clnt, | |||
143 | const struct rpc_message *msg, int flags); | 143 | const struct rpc_message *msg, int flags); |
144 | struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, | 144 | struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, |
145 | int flags); | 145 | int flags); |
146 | void rpc_restart_call_prepare(struct rpc_task *); | ||
146 | void rpc_restart_call(struct rpc_task *); | 147 | void rpc_restart_call(struct rpc_task *); |
147 | void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); | 148 | void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); |
148 | size_t rpc_max_payload(struct rpc_clnt *); | 149 | size_t rpc_max_payload(struct rpc_clnt *); |
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 64981a2f1cae..177376880fab 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -237,6 +237,7 @@ void rpc_show_tasks(void); | |||
237 | int rpc_init_mempool(void); | 237 | int rpc_init_mempool(void); |
238 | void rpc_destroy_mempool(void); | 238 | void rpc_destroy_mempool(void); |
239 | extern struct workqueue_struct *rpciod_workqueue; | 239 | extern struct workqueue_struct *rpciod_workqueue; |
240 | void rpc_prepare_task(struct rpc_task *task); | ||
240 | 241 | ||
241 | static inline void rpc_exit(struct rpc_task *task, int status) | 242 | static inline void rpc_exit(struct rpc_task *task, int status) |
242 | { | 243 | { |
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 5abab094441f..d00e8135f866 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -695,6 +695,19 @@ void rpc_force_rebind(struct rpc_clnt *clnt) | |||
695 | EXPORT_SYMBOL_GPL(rpc_force_rebind); | 695 | EXPORT_SYMBOL_GPL(rpc_force_rebind); |
696 | 696 | ||
697 | /* | 697 | /* |
698 | * Restart an (async) RPC call from the call_prepare state. | ||
699 | * Usually called from within the exit handler. | ||
700 | */ | ||
701 | void | ||
702 | rpc_restart_call_prepare(struct rpc_task *task) | ||
703 | { | ||
704 | if (RPC_ASSASSINATED(task)) | ||
705 | return; | ||
706 | task->tk_action = rpc_prepare_task; | ||
707 | } | ||
708 | EXPORT_SYMBOL_GPL(rpc_restart_call_prepare); | ||
709 | |||
710 | /* | ||
698 | * Restart an (async) RPC call. Usually called from within the | 711 | * Restart an (async) RPC call. Usually called from within the |
699 | * exit handler. | 712 | * exit handler. |
700 | */ | 713 | */ |
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index ff50a0546865..1102ce1251f7 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -569,7 +569,7 @@ EXPORT_SYMBOL_GPL(rpc_delay); | |||
569 | /* | 569 | /* |
570 | * Helper to call task->tk_ops->rpc_call_prepare | 570 | * Helper to call task->tk_ops->rpc_call_prepare |
571 | */ | 571 | */ |
572 | static void rpc_prepare_task(struct rpc_task *task) | 572 | void rpc_prepare_task(struct rpc_task *task) |
573 | { | 573 | { |
574 | task->tk_ops->rpc_call_prepare(task, task->tk_calldata); | 574 | task->tk_ops->rpc_call_prepare(task, task->tk_calldata); |
575 | } | 575 | } |