diff options
Diffstat (limited to 'net/sunrpc/svcsock.c')
-rw-r--r-- | net/sunrpc/svcsock.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 50580620e897..a27905a0ad27 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -1296,13 +1296,13 @@ svc_send(struct svc_rqst *rqstp) | |||
1296 | xb->page_len + | 1296 | xb->page_len + |
1297 | xb->tail[0].iov_len; | 1297 | xb->tail[0].iov_len; |
1298 | 1298 | ||
1299 | /* Grab svsk->sk_sem to serialize outgoing data. */ | 1299 | /* Grab svsk->sk_mutex to serialize outgoing data. */ |
1300 | down(&svsk->sk_sem); | 1300 | mutex_lock(&svsk->sk_mutex); |
1301 | if (test_bit(SK_DEAD, &svsk->sk_flags)) | 1301 | if (test_bit(SK_DEAD, &svsk->sk_flags)) |
1302 | len = -ENOTCONN; | 1302 | len = -ENOTCONN; |
1303 | else | 1303 | else |
1304 | len = svsk->sk_sendto(rqstp); | 1304 | len = svsk->sk_sendto(rqstp); |
1305 | up(&svsk->sk_sem); | 1305 | mutex_unlock(&svsk->sk_mutex); |
1306 | svc_sock_release(rqstp); | 1306 | svc_sock_release(rqstp); |
1307 | 1307 | ||
1308 | if (len == -ECONNREFUSED || len == -ENOTCONN || len == -EAGAIN) | 1308 | if (len == -ECONNREFUSED || len == -ENOTCONN || len == -EAGAIN) |
@@ -1351,7 +1351,7 @@ svc_setup_socket(struct svc_serv *serv, struct socket *sock, | |||
1351 | svsk->sk_lastrecv = get_seconds(); | 1351 | svsk->sk_lastrecv = get_seconds(); |
1352 | INIT_LIST_HEAD(&svsk->sk_deferred); | 1352 | INIT_LIST_HEAD(&svsk->sk_deferred); |
1353 | INIT_LIST_HEAD(&svsk->sk_ready); | 1353 | INIT_LIST_HEAD(&svsk->sk_ready); |
1354 | sema_init(&svsk->sk_sem, 1); | 1354 | mutex_init(&svsk->sk_mutex); |
1355 | 1355 | ||
1356 | /* Initialize the socket */ | 1356 | /* Initialize the socket */ |
1357 | if (sock->type == SOCK_DGRAM) | 1357 | if (sock->type == SOCK_DGRAM) |