Lines Matching defs:sock
111 static inline int iscsi_sw_sk_state_check(struct sock *sk)
124 static void iscsi_sw_tcp_data_ready(struct sock *sk, int flag)
151 static void iscsi_sw_tcp_state_change(struct sock *sk)
157 void (*old_state_change)(struct sock *);
179 static void iscsi_sw_tcp_write_space(struct sock *sk)
194 struct sock *sk = tcp_sw_conn->sock->sk;
213 struct sock *sk = tcp_sw_conn->sock->sk;
242 struct socket *sk = tcp_sw_conn->sock;
554 struct socket *sock = tcp_sw_conn->sock;
556 if (!sock)
559 sock_hold(sock->sk);
561 sock_put(sock->sk);
564 tcp_sw_conn->sock = NULL;
566 sockfd_put(sock);
590 struct socket *sock = tcp_sw_conn->sock;
593 if (!sock)
600 write_lock_bh(&tcp_sw_conn->sock->sk->sk_callback_lock);
602 write_unlock_bh(&tcp_sw_conn->sock->sk->sk_callback_lock);
604 sock->sk->sk_err = EIO;
605 wake_up_interruptible(sk_sleep(sock->sk));
611 static int iscsi_sw_tcp_get_addr(struct iscsi_conn *conn, struct socket *sock,
626 if (getname(sock, (struct sockaddr *) addr, &len)) {
662 struct sock *sk;
663 struct socket *sock;
667 sock = sockfd_lookup((int)transport_eph, &err);
668 if (!sock) {
678 err = iscsi_sw_tcp_get_addr(conn, sock, conn->portal_address,
683 err = iscsi_sw_tcp_get_addr(conn, sock, ihost->local_address,
693 tcp_sw_conn->sock = sock;
696 sk = sock->sk;
702 tcp_sw_conn->sendpage = tcp_sw_conn->sock->ops->sendpage;
710 sockfd_put(sock);
731 sock_no_sendpage : tcp_sw_conn->sock->ops->sendpage;