aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 13:47:44 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 13:47:44 -0500
commite4bdda1bc3123a9e65f4dd93a23041fde8ed3dc2 (patch)
treec2f75cc08bb4c5cbd9103e14399ea5ab66ce960d /net/sunrpc
parent74f3ae743427b87e43b5cb9f4257021ae8ad4267 (diff)
parent380454126f1357db9270f9d1ca05dfe1a6e4ad47 (diff)
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: NFSv4: Fix a regression in the NFSv4 state manager NFSv4: Release the sequence id before restarting a CLOSE rpc call nfs41: fix session fore channel negotiation nfs41: do not zero seqid portion of stateid on close nfs: run state manager in privileged mode nfs: make recovery state manager operations privileged nfs: enforce FIFO ordering of operations trying to acquire slot rpc: add a new priority in RPC task nfs: remove rpc_task argument from nfs4_find_slot rpc: add rpc_queue_empty function nfs: change nfs4_do_setlk params to identify recovery type nfs: do not do a LOOKUP after open nfs: minor cleanup of session draining
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/sched.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index cef74ba0666c..aae6907fd546 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -210,6 +210,7 @@ void rpc_init_priority_wait_queue(struct rpc_wait_queue *queue, const char *qnam
210{ 210{
211 __rpc_init_priority_wait_queue(queue, qname, RPC_NR_PRIORITY); 211 __rpc_init_priority_wait_queue(queue, qname, RPC_NR_PRIORITY);
212} 212}
213EXPORT_SYMBOL_GPL(rpc_init_priority_wait_queue);
213 214
214void rpc_init_wait_queue(struct rpc_wait_queue *queue, const char *qname) 215void rpc_init_wait_queue(struct rpc_wait_queue *queue, const char *qname)
215{ 216{
@@ -385,6 +386,20 @@ static void rpc_wake_up_task_queue_locked(struct rpc_wait_queue *queue, struct r
385} 386}
386 387
387/* 388/*
389 * Tests whether rpc queue is empty
390 */
391int rpc_queue_empty(struct rpc_wait_queue *queue)
392{
393 int res;
394
395 spin_lock_bh(&queue->lock);
396 res = queue->qlen;
397 spin_unlock_bh(&queue->lock);
398 return (res == 0);
399}
400EXPORT_SYMBOL_GPL(rpc_queue_empty);
401
402/*
388 * Wake up a task on a specific queue 403 * Wake up a task on a specific queue
389 */ 404 */
390void rpc_wake_up_queued_task(struct rpc_wait_queue *queue, struct rpc_task *task) 405void rpc_wake_up_queued_task(struct rpc_wait_queue *queue, struct rpc_task *task)