aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/sched.c')
-rw-r--r--net/sunrpc/sched.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index f6eed4d4e5dd..05825154ddd9 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -39,7 +39,6 @@ static mempool_t *rpc_task_mempool __read_mostly;
39static mempool_t *rpc_buffer_mempool __read_mostly; 39static mempool_t *rpc_buffer_mempool __read_mostly;
40 40
41static void __rpc_default_timer(struct rpc_task *task); 41static void __rpc_default_timer(struct rpc_task *task);
42static void rpciod_killall(void);
43static void rpc_async_schedule(struct work_struct *); 42static void rpc_async_schedule(struct work_struct *);
44static void rpc_release_task(struct rpc_task *task); 43static void rpc_release_task(struct rpc_task *task);
45 44
@@ -52,7 +51,6 @@ static RPC_WAITQ(delay_queue, "delayq");
52 * All RPC clients are linked into this list 51 * All RPC clients are linked into this list
53 */ 52 */
54static LIST_HEAD(all_clients); 53static LIST_HEAD(all_clients);
55static DECLARE_WAIT_QUEUE_HEAD(client_kill_wait);
56 54
57/* 55/*
58 * rpciod-related stuff 56 * rpciod-related stuff
@@ -996,32 +994,6 @@ void rpc_killall_tasks(struct rpc_clnt *clnt)
996 spin_unlock(&clnt->cl_lock); 994 spin_unlock(&clnt->cl_lock);
997} 995}
998 996
999static void rpciod_killall(void)
1000{
1001 struct rpc_clnt *clnt;
1002 unsigned long flags;
1003
1004 for(;;) {
1005 clear_thread_flag(TIF_SIGPENDING);
1006
1007 spin_lock(&rpc_sched_lock);
1008 list_for_each_entry(clnt, &all_clients, cl_clients)
1009 rpc_killall_tasks(clnt);
1010 spin_unlock(&rpc_sched_lock);
1011 flush_workqueue(rpciod_workqueue);
1012 if (!list_empty(&all_clients))
1013 break;
1014 dprintk("RPC: rpciod_killall: waiting for tasks "
1015 "to exit\n");
1016 wait_event_timeout(client_kill_wait,
1017 list_empty(&all_clients), 1*HZ);
1018 }
1019
1020 spin_lock_irqsave(&current->sighand->siglock, flags);
1021 recalc_sigpending();
1022 spin_unlock_irqrestore(&current->sighand->siglock, flags);
1023}
1024
1025void rpc_register_client(struct rpc_clnt *clnt) 997void rpc_register_client(struct rpc_clnt *clnt)
1026{ 998{
1027 spin_lock(&rpc_sched_lock); 999 spin_lock(&rpc_sched_lock);
@@ -1033,8 +1005,6 @@ void rpc_unregister_client(struct rpc_clnt *clnt)
1033{ 1005{
1034 spin_lock(&rpc_sched_lock); 1006 spin_lock(&rpc_sched_lock);
1035 list_del(&clnt->cl_clients); 1007 list_del(&clnt->cl_clients);
1036 if (list_empty(&all_clients))
1037 wake_up(&client_kill_wait);
1038 spin_unlock(&rpc_sched_lock); 1008 spin_unlock(&rpc_sched_lock);
1039} 1009}
1040 1010
@@ -1083,7 +1053,6 @@ rpciod_down(void)
1083 dprintk("RPC: destroying workqueue rpciod\n"); 1053 dprintk("RPC: destroying workqueue rpciod\n");
1084 1054
1085 if (atomic_read(&rpciod_users) == 0 && rpciod_workqueue != NULL) { 1055 if (atomic_read(&rpciod_users) == 0 && rpciod_workqueue != NULL) {
1086 rpciod_killall();
1087 destroy_workqueue(rpciod_workqueue); 1056 destroy_workqueue(rpciod_workqueue);
1088 rpciod_workqueue = NULL; 1057 rpciod_workqueue = NULL;
1089 } 1058 }