diff options
Diffstat (limited to 'include/linux/sunrpc/sched.h')
-rw-r--r-- | include/linux/sunrpc/sched.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index f399c138f79d..97c761652581 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/timer.h> | 12 | #include <linux/timer.h> |
13 | #include <linux/sunrpc/types.h> | 13 | #include <linux/sunrpc/types.h> |
14 | #include <linux/rcupdate.h> | ||
14 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
15 | #include <linux/wait.h> | 16 | #include <linux/wait.h> |
16 | #include <linux/workqueue.h> | 17 | #include <linux/workqueue.h> |
@@ -85,6 +86,7 @@ struct rpc_task { | |||
85 | union { | 86 | union { |
86 | struct work_struct tk_work; /* Async task work queue */ | 87 | struct work_struct tk_work; /* Async task work queue */ |
87 | struct rpc_wait tk_wait; /* RPC wait */ | 88 | struct rpc_wait tk_wait; /* RPC wait */ |
89 | struct rcu_head tk_rcu; /* for task deletion */ | ||
88 | } u; | 90 | } u; |
89 | 91 | ||
90 | unsigned short tk_timeouts; /* maj timeouts */ | 92 | unsigned short tk_timeouts; /* maj timeouts */ |
@@ -178,13 +180,6 @@ struct rpc_call_ops { | |||
178 | } while (0) | 180 | } while (0) |
179 | 181 | ||
180 | #define RPC_IS_ACTIVATED(t) (test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate)) | 182 | #define RPC_IS_ACTIVATED(t) (test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate)) |
181 | #define rpc_set_active(t) (set_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate)) | ||
182 | #define rpc_clear_active(t) \ | ||
183 | do { \ | ||
184 | smp_mb__before_clear_bit(); \ | ||
185 | clear_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate); \ | ||
186 | smp_mb__after_clear_bit(); \ | ||
187 | } while(0) | ||
188 | 183 | ||
189 | /* | 184 | /* |
190 | * Task priorities. | 185 | * Task priorities. |
@@ -222,7 +217,7 @@ struct rpc_wait_queue { | |||
222 | 217 | ||
223 | #ifndef RPC_DEBUG | 218 | #ifndef RPC_DEBUG |
224 | # define RPC_WAITQ_INIT(var,qname) { \ | 219 | # define RPC_WAITQ_INIT(var,qname) { \ |
225 | .lock = SPIN_LOCK_UNLOCKED, \ | 220 | .lock = __SPIN_LOCK_UNLOCKED(var.lock), \ |
226 | .tasks = { \ | 221 | .tasks = { \ |
227 | [0] = LIST_HEAD_INIT(var.tasks[0]), \ | 222 | [0] = LIST_HEAD_INIT(var.tasks[0]), \ |
228 | [1] = LIST_HEAD_INIT(var.tasks[1]), \ | 223 | [1] = LIST_HEAD_INIT(var.tasks[1]), \ |
@@ -231,7 +226,7 @@ struct rpc_wait_queue { | |||
231 | } | 226 | } |
232 | #else | 227 | #else |
233 | # define RPC_WAITQ_INIT(var,qname) { \ | 228 | # define RPC_WAITQ_INIT(var,qname) { \ |
234 | .lock = SPIN_LOCK_UNLOCKED, \ | 229 | .lock = __SPIN_LOCK_UNLOCKED(var.lock), \ |
235 | .tasks = { \ | 230 | .tasks = { \ |
236 | [0] = LIST_HEAD_INIT(var.tasks[0]), \ | 231 | [0] = LIST_HEAD_INIT(var.tasks[0]), \ |
237 | [1] = LIST_HEAD_INIT(var.tasks[1]), \ | 232 | [1] = LIST_HEAD_INIT(var.tasks[1]), \ |
@@ -254,8 +249,10 @@ struct rpc_task *rpc_run_task(struct rpc_clnt *clnt, int flags, | |||
254 | void rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt, | 249 | void rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt, |
255 | int flags, const struct rpc_call_ops *ops, | 250 | int flags, const struct rpc_call_ops *ops, |
256 | void *data); | 251 | void *data); |
252 | void rpc_put_task(struct rpc_task *); | ||
257 | void rpc_release_task(struct rpc_task *); | 253 | void rpc_release_task(struct rpc_task *); |
258 | void rpc_exit_task(struct rpc_task *); | 254 | void rpc_exit_task(struct rpc_task *); |
255 | void rpc_release_calldata(const struct rpc_call_ops *, void *); | ||
259 | void rpc_killall_tasks(struct rpc_clnt *); | 256 | void rpc_killall_tasks(struct rpc_clnt *); |
260 | int rpc_execute(struct rpc_task *); | 257 | int rpc_execute(struct rpc_task *); |
261 | void rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *); | 258 | void rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *); |