aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/sched.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 12:18:27 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 12:18:27 -0500
commit53846a21c1766326bb14ce8ab6e997a0c120675d (patch)
tree37b04485e29844b4e734479181276a2f4d2447e4 /net/sunrpc/sched.c
parent2e9abdd9bad485970b37cd53a82f92702054984c (diff)
parent1ebbe2b20091d306453a5cf480a87e6cd28ae76f (diff)
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6
* git://git.linux-nfs.org/pub/linux/nfs-2.6: (103 commits) SUNRPC,RPCSEC_GSS: spkm3--fix config dependencies SUNRPC,RPCSEC_GSS: spkm3: import contexts using NID_cast5_cbc LOCKD: Make nlmsvc_traverse_shares return void LOCKD: nlmsvc_traverse_blocks return is unused SUNRPC,RPCSEC_GSS: fix krb5 sequence numbers. NFSv4: Dont list system.nfs4_acl for filesystems that don't support it. SUNRPC,RPCSEC_GSS: remove unnecessary kmalloc of a checksum SUNRPC: Ensure rpc_call_async() always calls tk_ops->rpc_release() SUNRPC: Fix memory barriers for req->rq_received NFS: Fix a race in nfs_sync_inode() NFS: Clean up nfs_flush_list() NFS: Fix a race with PG_private and nfs_release_page() NFSv4: Ensure the callback daemon flushes signals SUNRPC: Fix a 'Busy inodes' error in rpc_pipefs NFS, NLM: Allow blocking locks to respect signals NFS: Make nfs_fhget() return appropriate error values NFSv4: Fix an oops in nfs4_fill_super lockd: blocks should hold a reference to the nlm_file NFSv4: SETCLIENTID_CONFIRM should handle NFS4ERR_DELAY/NFS4ERR_RESOURCE NFSv4: Send the delegation stateid for SETATTR calls ...
Diffstat (limited to 'net/sunrpc/sched.c')
-rw-r--r--net/sunrpc/sched.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index dff07795bd16..b9969b91a9f7 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -65,7 +65,7 @@ static LIST_HEAD(all_tasks);
65 */ 65 */
66static DEFINE_MUTEX(rpciod_mutex); 66static DEFINE_MUTEX(rpciod_mutex);
67static unsigned int rpciod_users; 67static unsigned int rpciod_users;
68static struct workqueue_struct *rpciod_workqueue; 68struct workqueue_struct *rpciod_workqueue;
69 69
70/* 70/*
71 * Spinlock for other critical sections of code. 71 * Spinlock for other critical sections of code.
@@ -182,6 +182,7 @@ static void __rpc_add_wait_queue(struct rpc_wait_queue *queue, struct rpc_task *
182 else 182 else
183 list_add_tail(&task->u.tk_wait.list, &queue->tasks[0]); 183 list_add_tail(&task->u.tk_wait.list, &queue->tasks[0]);
184 task->u.tk_wait.rpc_waitq = queue; 184 task->u.tk_wait.rpc_waitq = queue;
185 queue->qlen++;
185 rpc_set_queued(task); 186 rpc_set_queued(task);
186 187
187 dprintk("RPC: %4d added to queue %p \"%s\"\n", 188 dprintk("RPC: %4d added to queue %p \"%s\"\n",
@@ -216,6 +217,7 @@ static void __rpc_remove_wait_queue(struct rpc_task *task)
216 __rpc_remove_wait_queue_priority(task); 217 __rpc_remove_wait_queue_priority(task);
217 else 218 else
218 list_del(&task->u.tk_wait.list); 219 list_del(&task->u.tk_wait.list);
220 queue->qlen--;
219 dprintk("RPC: %4d removed from queue %p \"%s\"\n", 221 dprintk("RPC: %4d removed from queue %p \"%s\"\n",
220 task->tk_pid, queue, rpc_qname(queue)); 222 task->tk_pid, queue, rpc_qname(queue));
221} 223}
@@ -816,6 +818,9 @@ void rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt, int flags, cons
816 818
817 BUG_ON(task->tk_ops == NULL); 819 BUG_ON(task->tk_ops == NULL);
818 820
821 /* starting timestamp */
822 task->tk_start = jiffies;
823
819 dprintk("RPC: %4d new task procpid %d\n", task->tk_pid, 824 dprintk("RPC: %4d new task procpid %d\n", task->tk_pid,
820 current->pid); 825 current->pid);
821} 826}
@@ -917,8 +922,11 @@ struct rpc_task *rpc_run_task(struct rpc_clnt *clnt, int flags,
917{ 922{
918 struct rpc_task *task; 923 struct rpc_task *task;
919 task = rpc_new_task(clnt, flags, ops, data); 924 task = rpc_new_task(clnt, flags, ops, data);
920 if (task == NULL) 925 if (task == NULL) {
926 if (ops->rpc_release != NULL)
927 ops->rpc_release(data);
921 return ERR_PTR(-ENOMEM); 928 return ERR_PTR(-ENOMEM);
929 }
922 atomic_inc(&task->tk_count); 930 atomic_inc(&task->tk_count);
923 rpc_execute(task); 931 rpc_execute(task);
924 return task; 932 return task;