diff options
Diffstat (limited to 'net/sunrpc/svcsock.c')
-rw-r--r-- | net/sunrpc/svcsock.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index b78659adeff3..cba85d195222 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -151,8 +151,9 @@ static void | |||
151 | svc_sock_enqueue(struct svc_sock *svsk) | 151 | svc_sock_enqueue(struct svc_sock *svsk) |
152 | { | 152 | { |
153 | struct svc_serv *serv = svsk->sk_server; | 153 | struct svc_serv *serv = svsk->sk_server; |
154 | struct svc_pool *pool = &serv->sv_pools[0]; | 154 | struct svc_pool *pool; |
155 | struct svc_rqst *rqstp; | 155 | struct svc_rqst *rqstp; |
156 | int cpu; | ||
156 | 157 | ||
157 | if (!(svsk->sk_flags & | 158 | if (!(svsk->sk_flags & |
158 | ( (1<<SK_CONN)|(1<<SK_DATA)|(1<<SK_CLOSE)|(1<<SK_DEFERRED)) )) | 159 | ( (1<<SK_CONN)|(1<<SK_DATA)|(1<<SK_CLOSE)|(1<<SK_DEFERRED)) )) |
@@ -160,6 +161,10 @@ svc_sock_enqueue(struct svc_sock *svsk) | |||
160 | if (test_bit(SK_DEAD, &svsk->sk_flags)) | 161 | if (test_bit(SK_DEAD, &svsk->sk_flags)) |
161 | return; | 162 | return; |
162 | 163 | ||
164 | cpu = get_cpu(); | ||
165 | pool = svc_pool_for_cpu(svsk->sk_server, cpu); | ||
166 | put_cpu(); | ||
167 | |||
163 | spin_lock_bh(&pool->sp_lock); | 168 | spin_lock_bh(&pool->sp_lock); |
164 | 169 | ||
165 | if (!list_empty(&pool->sp_threads) && | 170 | if (!list_empty(&pool->sp_threads) && |