diff options
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/sched.c | 15 |
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 | } |
213 | EXPORT_SYMBOL_GPL(rpc_init_priority_wait_queue); | ||
213 | 214 | ||
214 | void rpc_init_wait_queue(struct rpc_wait_queue *queue, const char *qname) | 215 | void 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 | */ | ||
391 | int 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 | } | ||
400 | EXPORT_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 | */ |
390 | void rpc_wake_up_queued_task(struct rpc_wait_queue *queue, struct rpc_task *task) | 405 | void rpc_wake_up_queued_task(struct rpc_wait_queue *queue, struct rpc_task *task) |