Module Name: src
Committed By: matt
Date: Fri Sep 5 09:27:34 UTC 2014
Modified Files:
src/sys/dev/iscsi: iscsi_rcv.c iscsi_send.c
Log Message:
Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get
a correctly typed pointer.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/iscsi/iscsi_rcv.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/iscsi/iscsi_send.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/iscsi/iscsi_rcv.c
diff -u src/sys/dev/iscsi/iscsi_rcv.c:1.5 src/sys/dev/iscsi/iscsi_rcv.c:1.6
--- src/sys/dev/iscsi/iscsi_rcv.c:1.5 Sun Oct 20 21:11:15 2013
+++ src/sys/dev/iscsi/iscsi_rcv.c Fri Sep 5 09:27:34 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: iscsi_rcv.c,v 1.5 2013/10/20 21:11:15 christos Exp $ */
+/* $NetBSD: iscsi_rcv.c,v 1.6 2014/09/05 09:27:34 matt Exp $ */
/*-
* Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -51,7 +51,7 @@
STATIC int
my_soo_read(connection_t *conn, struct uio *u, int flags)
{
- struct socket *so = (struct socket *) conn->sock->f_data;
+ struct socket *so = conn->sock->f_socket;
int ret;
#ifdef ISCSI_DEBUG
size_t resid = u->uio_resid;
Index: src/sys/dev/iscsi/iscsi_send.c
diff -u src/sys/dev/iscsi/iscsi_send.c:1.8 src/sys/dev/iscsi/iscsi_send.c:1.9
--- src/sys/dev/iscsi/iscsi_send.c:1.8 Sat Dec 29 11:05:30 2012
+++ src/sys/dev/iscsi/iscsi_send.c Fri Sep 5 09:27:34 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: iscsi_send.c,v 1.8 2012/12/29 11:05:30 mlelstv Exp $ */
+/* $NetBSD: iscsi_send.c,v 1.9 2014/09/05 09:27:34 matt Exp $ */
/*-
* Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
STATIC int
my_soo_write(connection_t *conn, struct uio *u)
{
- struct socket *so = (struct socket *) conn->sock->f_data;
+ struct socket *so = conn->sock->f_socket;
size_t resid = u->uio_resid;
int ret;
@@ -369,9 +369,9 @@ iscsi_send_thread(void *par)
* thread to wake up
*/
DEBC(conn, 1, ("Closing Socket %p\n", conn->sock));
- solock((struct socket *) fp->f_data);
- soshutdown((struct socket *) fp->f_data, SHUT_RDWR);
- sounlock((struct socket *) fp->f_data);
+ solock(fp->f_socket);
+ soshutdown(fp->f_socket, SHUT_RDWR);
+ sounlock(fp->f_socket);
/* wake up any non-reassignable waiting CCBs */
TAILQ_FOREACH_SAFE(ccb, &conn->ccbs_waiting, chain, nccb) {