aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-03-21 01:35:41 -0500
committerDavid S. Miller <davem@davemloft.net>2006-03-21 01:35:41 -0500
commit57b47a53ec4a67691ba32cff5768e8d78fa6c67f (patch)
treed735ae4734f7b386eefa508a0629715f45808d1d /net/sunrpc
parent6613f82dd293b23f582a649b287fadbf8d23e6cf (diff)
[NET]: sem2mutex part 2
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/svcsock.c8
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)