Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/iscsi No need to acquire KERNEL_LOCK when entering n...
details: https://anonhg.NetBSD.org/src/rev/011226c4a630
branches: trunk
changeset: 345692:011226c4a630
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Sun Jun 05 05:31:43 2016 +0000
description:
No need to acquire KERNEL_LOCK when entering network code.
Also use the socket callbacks.
diffstat:
sys/dev/iscsi/iscsi_rcv.c | 6 ++----
sys/dev/iscsi/iscsi_send.c | 6 ++----
2 files changed, 4 insertions(+), 8 deletions(-)
diffs (40 lines):
diff -r 647e997880af -r 011226c4a630 sys/dev/iscsi/iscsi_rcv.c
--- a/sys/dev/iscsi/iscsi_rcv.c Sun Jun 05 05:29:01 2016 +0000
+++ b/sys/dev/iscsi/iscsi_rcv.c Sun Jun 05 05:31:43 2016 +0000
@@ -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 @@
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 -r 647e997880af -r 011226c4a630 sys/dev/iscsi/iscsi_send.c
--- a/sys/dev/iscsi/iscsi_send.c Sun Jun 05 05:29:01 2016 +0000
+++ b/sys/dev/iscsi/iscsi_send.c Sun Jun 05 05:31:43 2016 +0000
@@ -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 @@
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));
Home |
Main Index |
Thread Index |
Old Index