diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/svc_xprt.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 143c4c8ea2f1..37446046f4bf 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c | |||
@@ -509,7 +509,7 @@ void svc_wake_up(struct svc_serv *serv) | |||
509 | */ | 509 | */ |
510 | wake_up_process(rqstp->rq_task); | 510 | wake_up_process(rqstp->rq_task); |
511 | } else | 511 | } else |
512 | pool->sp_task_pending = 1; | 512 | set_bit(SP_TASK_PENDING, &pool->sp_flags); |
513 | spin_unlock_bh(&pool->sp_lock); | 513 | spin_unlock_bh(&pool->sp_lock); |
514 | } | 514 | } |
515 | } | 515 | } |
@@ -644,10 +644,9 @@ static struct svc_xprt *svc_get_next_xprt(struct svc_rqst *rqstp, long timeout) | |||
644 | * long for cache updates. | 644 | * long for cache updates. |
645 | */ | 645 | */ |
646 | rqstp->rq_chandle.thread_wait = 1*HZ; | 646 | rqstp->rq_chandle.thread_wait = 1*HZ; |
647 | pool->sp_task_pending = 0; | 647 | clear_bit(SP_TASK_PENDING, &pool->sp_flags); |
648 | } else { | 648 | } else { |
649 | if (pool->sp_task_pending) { | 649 | if (test_and_clear_bit(SP_TASK_PENDING, &pool->sp_flags)) { |
650 | pool->sp_task_pending = 0; | ||
651 | xprt = ERR_PTR(-EAGAIN); | 650 | xprt = ERR_PTR(-EAGAIN); |
652 | goto out; | 651 | goto out; |
653 | } | 652 | } |