diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-06-16 14:18:40 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-10 23:40:30 -0400 |
commit | 188fef11db219f13f32d055ba59985e7d1a349fe (patch) | |
tree | b64754962315934c1fa33fca16eabffeb901425a /net/sunrpc/sched.c | |
parent | f61534dfd38f895b203e2aadaba04f21a992ca8c (diff) |
SUNRPC: Move rpc_register_client and friends into net/sunrpc/clnt.c
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/sched.c')
-rw-r--r-- | net/sunrpc/sched.c | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index 05825154ddd9..c0f8d25caf57 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -48,11 +48,6 @@ static void rpc_release_task(struct rpc_task *task); | |||
48 | static RPC_WAITQ(delay_queue, "delayq"); | 48 | static RPC_WAITQ(delay_queue, "delayq"); |
49 | 49 | ||
50 | /* | 50 | /* |
51 | * All RPC clients are linked into this list | ||
52 | */ | ||
53 | static LIST_HEAD(all_clients); | ||
54 | |||
55 | /* | ||
56 | * rpciod-related stuff | 51 | * rpciod-related stuff |
57 | */ | 52 | */ |
58 | static DEFINE_MUTEX(rpciod_mutex); | 53 | static DEFINE_MUTEX(rpciod_mutex); |
@@ -60,11 +55,6 @@ static atomic_t rpciod_users = ATOMIC_INIT(0); | |||
60 | struct workqueue_struct *rpciod_workqueue; | 55 | struct workqueue_struct *rpciod_workqueue; |
61 | 56 | ||
62 | /* | 57 | /* |
63 | * Spinlock for other critical sections of code. | ||
64 | */ | ||
65 | static DEFINE_SPINLOCK(rpc_sched_lock); | ||
66 | |||
67 | /* | ||
68 | * Disable the timer for a given RPC task. Should be called with | 58 | * Disable the timer for a given RPC task. Should be called with |
69 | * queue->lock and bh_disabled in order to avoid races within | 59 | * queue->lock and bh_disabled in order to avoid races within |
70 | * rpc_run_timer(). | 60 | * rpc_run_timer(). |
@@ -994,20 +984,6 @@ void rpc_killall_tasks(struct rpc_clnt *clnt) | |||
994 | spin_unlock(&clnt->cl_lock); | 984 | spin_unlock(&clnt->cl_lock); |
995 | } | 985 | } |
996 | 986 | ||
997 | void rpc_register_client(struct rpc_clnt *clnt) | ||
998 | { | ||
999 | spin_lock(&rpc_sched_lock); | ||
1000 | list_add(&clnt->cl_clients, &all_clients); | ||
1001 | spin_unlock(&rpc_sched_lock); | ||
1002 | } | ||
1003 | |||
1004 | void rpc_unregister_client(struct rpc_clnt *clnt) | ||
1005 | { | ||
1006 | spin_lock(&rpc_sched_lock); | ||
1007 | list_del(&clnt->cl_clients); | ||
1008 | spin_unlock(&rpc_sched_lock); | ||
1009 | } | ||
1010 | |||
1011 | /* | 987 | /* |
1012 | * Start up the rpciod process if it's not already running. | 988 | * Start up the rpciod process if it's not already running. |
1013 | */ | 989 | */ |
@@ -1059,44 +1035,6 @@ rpciod_down(void) | |||
1059 | mutex_unlock(&rpciod_mutex); | 1035 | mutex_unlock(&rpciod_mutex); |
1060 | } | 1036 | } |
1061 | 1037 | ||
1062 | #ifdef RPC_DEBUG | ||
1063 | void rpc_show_tasks(void) | ||
1064 | { | ||
1065 | struct rpc_clnt *clnt; | ||
1066 | struct rpc_task *t; | ||
1067 | |||
1068 | spin_lock(&rpc_sched_lock); | ||
1069 | if (list_empty(&all_clients)) | ||
1070 | goto out; | ||
1071 | printk("-pid- proc flgs status -client- -prog- --rqstp- -timeout " | ||
1072 | "-rpcwait -action- ---ops--\n"); | ||
1073 | list_for_each_entry(clnt, &all_clients, cl_clients) { | ||
1074 | if (list_empty(&clnt->cl_tasks)) | ||
1075 | continue; | ||
1076 | spin_lock(&clnt->cl_lock); | ||
1077 | list_for_each_entry(t, &clnt->cl_tasks, tk_task) { | ||
1078 | const char *rpc_waitq = "none"; | ||
1079 | |||
1080 | if (RPC_IS_QUEUED(t)) | ||
1081 | rpc_waitq = rpc_qname(t->u.tk_wait.rpc_waitq); | ||
1082 | |||
1083 | printk("%5u %04d %04x %6d %8p %6d %8p %8ld %8s %8p %8p\n", | ||
1084 | t->tk_pid, | ||
1085 | (t->tk_msg.rpc_proc ? t->tk_msg.rpc_proc->p_proc : -1), | ||
1086 | t->tk_flags, t->tk_status, | ||
1087 | t->tk_client, | ||
1088 | (t->tk_client ? t->tk_client->cl_prog : 0), | ||
1089 | t->tk_rqstp, t->tk_timeout, | ||
1090 | rpc_waitq, | ||
1091 | t->tk_action, t->tk_ops); | ||
1092 | } | ||
1093 | spin_unlock(&clnt->cl_lock); | ||
1094 | } | ||
1095 | out: | ||
1096 | spin_unlock(&rpc_sched_lock); | ||
1097 | } | ||
1098 | #endif | ||
1099 | |||
1100 | void | 1038 | void |
1101 | rpc_destroy_mempool(void) | 1039 | rpc_destroy_mempool(void) |
1102 | { | 1040 | { |