diff options
-rw-r--r-- | include/linux/sunrpc/sched.h | 1 | ||||
-rw-r--r-- | net/sunrpc/rpc_pipe.c | 5 | ||||
-rw-r--r-- | net/sunrpc/sched.c | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 8b25629accd8..a390c9b8a01e 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -276,6 +276,7 @@ void rpc_show_tasks(void); | |||
276 | #endif | 276 | #endif |
277 | int rpc_init_mempool(void); | 277 | int rpc_init_mempool(void); |
278 | void rpc_destroy_mempool(void); | 278 | void rpc_destroy_mempool(void); |
279 | extern struct workqueue_struct *rpciod_workqueue; | ||
279 | 280 | ||
280 | static inline void rpc_exit(struct rpc_task *task, int status) | 281 | static inline void rpc_exit(struct rpc_task *task, int status) |
281 | { | 282 | { |
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index a5c0c7b6e151..567abbe25bc8 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c | |||
@@ -91,7 +91,8 @@ rpc_queue_upcall(struct inode *inode, struct rpc_pipe_msg *msg) | |||
91 | res = 0; | 91 | res = 0; |
92 | } else if (rpci->flags & RPC_PIPE_WAIT_FOR_OPEN) { | 92 | } else if (rpci->flags & RPC_PIPE_WAIT_FOR_OPEN) { |
93 | if (list_empty(&rpci->pipe)) | 93 | if (list_empty(&rpci->pipe)) |
94 | schedule_delayed_work(&rpci->queue_timeout, | 94 | queue_delayed_work(rpciod_workqueue, |
95 | &rpci->queue_timeout, | ||
95 | RPC_UPCALL_TIMEOUT); | 96 | RPC_UPCALL_TIMEOUT); |
96 | list_add_tail(&msg->list, &rpci->pipe); | 97 | list_add_tail(&msg->list, &rpci->pipe); |
97 | rpci->pipelen += msg->len; | 98 | rpci->pipelen += msg->len; |
@@ -132,7 +133,7 @@ rpc_close_pipes(struct inode *inode) | |||
132 | if (ops->release_pipe) | 133 | if (ops->release_pipe) |
133 | ops->release_pipe(inode); | 134 | ops->release_pipe(inode); |
134 | cancel_delayed_work(&rpci->queue_timeout); | 135 | cancel_delayed_work(&rpci->queue_timeout); |
135 | flush_scheduled_work(); | 136 | flush_workqueue(rpciod_workqueue); |
136 | } | 137 | } |
137 | rpc_inode_setowner(inode, NULL); | 138 | rpc_inode_setowner(inode, NULL); |
138 | mutex_unlock(&inode->i_mutex); | 139 | mutex_unlock(&inode->i_mutex); |
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index e838d042f7f5..1b74420d1603 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -64,7 +64,7 @@ static LIST_HEAD(all_tasks); | |||
64 | */ | 64 | */ |
65 | static DECLARE_MUTEX(rpciod_sema); | 65 | static DECLARE_MUTEX(rpciod_sema); |
66 | static unsigned int rpciod_users; | 66 | static unsigned int rpciod_users; |
67 | static struct workqueue_struct *rpciod_workqueue; | 67 | struct workqueue_struct *rpciod_workqueue; |
68 | 68 | ||
69 | /* | 69 | /* |
70 | * Spinlock for other critical sections of code. | 70 | * Spinlock for other critical sections of code. |