diff options
| author | mlelstv <mlelstv@NetBSD.org> | 2016-06-05 05:31:43 +0000 |
|---|---|---|
| committer | mlelstv <mlelstv@NetBSD.org> | 2016-06-05 05:31:43 +0000 |
| commit | 7f823d2c4bbba7772855d736e3d1d9401d68c8f2 (patch) | |
| tree | eb0524a2b96428943217f34f23fd214bfb1f9f57 /sys/dev | |
| parent | e4f76eaef4dd0a573c707bf882963524f15b6bcb (diff) | |
No need to acquire KERNEL_LOCK when entering network code.
Also use the socket callbacks.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/iscsi/iscsi_rcv.c | 6 | ||||
| -rw-r--r-- | sys/dev/iscsi/iscsi_send.c | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/sys/dev/iscsi/iscsi_rcv.c b/sys/dev/iscsi/iscsi_rcv.c index 7e53a3d42ec..79291ebef0d 100644 --- a/sys/dev/iscsi/iscsi_rcv.c +++ b/sys/dev/iscsi/iscsi_rcv.c @@ -1,4 +1,4 @@ -/* $NetBSD: iscsi_rcv.c,v 1.16 2016/06/05 05:11:57 mlelstv Exp $ */ +/* $NetBSD: iscsi_rcv.c,v 1.17 2016/06/05 05:31:43 mlelstv Exp $ */ /*- * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc. @@ -59,9 +59,7 @@ my_soo_read(connection_t *conn, struct uio *u, int flags) DEBC(conn, 99, ("soo_read req: %zu\n", resid)); - KERNEL_LOCK(1, curlwp); - ret = soreceive(so, NULL, u, NULL, NULL, &flags); - KERNEL_UNLOCK_ONE(curlwp); + ret = (*so->so_receive)(so, NULL, u, NULL, NULL, &flags); if (ret || (flags != MSG_DONTWAIT && u->uio_resid)) { DEBC(conn, 1, ("Read failed (ret: %d, req: %zu, out: %zu)\n", diff --git a/sys/dev/iscsi/iscsi_send.c b/sys/dev/iscsi/iscsi_send.c index cb8baf77a3d..5e1162802cb 100644 --- a/sys/dev/iscsi/iscsi_send.c +++ b/sys/dev/iscsi/iscsi_send.c @@ -1,4 +1,4 @@ -/* $NetBSD: iscsi_send.c,v 1.23 2016/06/05 05:25:59 mlelstv Exp $ */ +/* $NetBSD: iscsi_send.c,v 1.24 2016/06/05 05:31:43 mlelstv Exp $ */ /*- * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc. @@ -62,9 +62,7 @@ my_soo_write(connection_t *conn, struct uio *u) KASSERT(u->uio_resid != 0); - KERNEL_LOCK(1, curlwp); - ret = sosend(so, NULL, u, NULL, NULL, 0, conn->threadobj); - KERNEL_UNLOCK_ONE(curlwp); + ret = (*so->so_send)(so, NULL, u, NULL, NULL, 0, conn->threadobj); DEB(99, ("soo_write done: len = %zu\n", u->uio_resid)); |
