]> Pileus Git - ~andy/linux/commitdiff
SUNRPC: Run rpci->queue_timeout on the rpciod workqueue instead of generic
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 20 Mar 2006 18:44:08 +0000 (13:44 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 20 Mar 2006 18:44:08 +0000 (13:44 -0500)
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
include/linux/sunrpc/sched.h
net/sunrpc/rpc_pipe.c
net/sunrpc/sched.c

index 8b25629accd8880e044d57558f452b4d50a15283..a390c9b8a01e8182bd0a77161bd088d3a514233a 100644 (file)
@@ -276,6 +276,7 @@ void                rpc_show_tasks(void);
 #endif
 int            rpc_init_mempool(void);
 void           rpc_destroy_mempool(void);
+extern struct workqueue_struct *rpciod_workqueue;
 
 static inline void rpc_exit(struct rpc_task *task, int status)
 {
index a5c0c7b6e151b4a8712ec67d3c3cdbf32308497c..567abbe25bc82d56f727b24b0cd0a9b53bfd903e 100644 (file)
@@ -91,7 +91,8 @@ rpc_queue_upcall(struct inode *inode, struct rpc_pipe_msg *msg)
                res = 0;
        } else if (rpci->flags & RPC_PIPE_WAIT_FOR_OPEN) {
                if (list_empty(&rpci->pipe))
-                       schedule_delayed_work(&rpci->queue_timeout,
+                       queue_delayed_work(rpciod_workqueue,
+                                       &rpci->queue_timeout,
                                        RPC_UPCALL_TIMEOUT);
                list_add_tail(&msg->list, &rpci->pipe);
                rpci->pipelen += msg->len;
@@ -132,7 +133,7 @@ rpc_close_pipes(struct inode *inode)
                if (ops->release_pipe)
                        ops->release_pipe(inode);
                cancel_delayed_work(&rpci->queue_timeout);
-               flush_scheduled_work();
+               flush_workqueue(rpciod_workqueue);
        }
        rpc_inode_setowner(inode, NULL);
        mutex_unlock(&inode->i_mutex);
index e838d042f7f51e2f0ded4852ddc08441ba8ff687..1b74420d16030d034635733eff748b5aede50c98 100644 (file)
@@ -64,7 +64,7 @@ static LIST_HEAD(all_tasks);
  */
 static DECLARE_MUTEX(rpciod_sema);
 static unsigned int            rpciod_users;
-static struct workqueue_struct *rpciod_workqueue;
+struct workqueue_struct *rpciod_workqueue;
 
 /*
  * Spinlock for other critical sections of code.