Lines Matching refs:u

270 		struct unix_sock *u = unix_sk(s);  in __unix_find_socket_byname()  local
275 if (u->addr->len == len && in __unix_find_socket_byname()
276 !memcmp(u->addr->name, sunname, len)) in __unix_find_socket_byname()
347 struct unix_sock *u; in unix_dgram_peer_wake_relay() local
350 u = container_of(q, struct unix_sock, peer_wake); in unix_dgram_peer_wake_relay()
352 __remove_wait_queue(&unix_sk(u->peer_wake.private)->peer_wait, in unix_dgram_peer_wake_relay()
354 u->peer_wake.private = NULL; in unix_dgram_peer_wake_relay()
357 u_sleep = sk_sleep(&u->sk); in unix_dgram_peer_wake_relay()
366 struct unix_sock *u, *u_other; in unix_dgram_peer_wake_connect() local
369 u = unix_sk(sk); in unix_dgram_peer_wake_connect()
374 if (!u->peer_wake.private) { in unix_dgram_peer_wake_connect()
375 u->peer_wake.private = other; in unix_dgram_peer_wake_connect()
376 __add_wait_queue(&u_other->peer_wait, &u->peer_wake); in unix_dgram_peer_wake_connect()
388 struct unix_sock *u, *u_other; in unix_dgram_peer_wake_disconnect() local
390 u = unix_sk(sk); in unix_dgram_peer_wake_disconnect()
394 if (u->peer_wake.private == other) { in unix_dgram_peer_wake_disconnect()
395 __remove_wait_queue(&u_other->peer_wait, &u->peer_wake); in unix_dgram_peer_wake_disconnect()
396 u->peer_wake.private = NULL; in unix_dgram_peer_wake_disconnect()
474 struct unix_sock *u = unix_sk(sk); in unix_sock_destructor() local
486 if (u->addr) in unix_sock_destructor()
487 unix_release_addr(u->addr); in unix_sock_destructor()
501 struct unix_sock *u = unix_sk(sk); in unix_release_sock() local
513 path = u->path; in unix_release_sock()
514 u->path.dentry = NULL; in unix_release_sock()
515 u->path.mnt = NULL; in unix_release_sock()
520 wake_up_interruptible_all(&u->peer_wait); in unix_release_sock()
594 struct unix_sock *u = unix_sk(sk); in unix_listen() local
601 if (!u->addr) in unix_listen()
607 wake_up_interruptible_all(&u->peer_wait); in unix_listen()
645 struct unix_sock *u = unix_sk(sk); in unix_set_peek_off() local
647 if (mutex_lock_interruptible(&u->readlock)) in unix_set_peek_off()
651 mutex_unlock(&u->readlock); in unix_set_peek_off()
740 struct unix_sock *u; in unix_create1() local
757 u = unix_sk(sk); in unix_create1()
758 u->path.dentry = NULL; in unix_create1()
759 u->path.mnt = NULL; in unix_create1()
760 spin_lock_init(&u->lock); in unix_create1()
761 atomic_long_set(&u->inflight, 0); in unix_create1()
762 INIT_LIST_HEAD(&u->link); in unix_create1()
763 mutex_init(&u->readlock); /* single task reading lock */ in unix_create1()
764 init_waitqueue_head(&u->peer_wait); in unix_create1()
765 init_waitqueue_func_entry(&u->peer_wake, unix_dgram_peer_wake_relay); in unix_create1()
826 struct unix_sock *u = unix_sk(sk); in unix_autobind() local
832 err = mutex_lock_interruptible(&u->readlock); in unix_autobind()
837 if (u->addr) in unix_autobind()
874 u->addr = addr; in unix_autobind()
879 out: mutex_unlock(&u->readlock); in unix_autobind()
887 struct sock *u; in unix_find_other() local
904 u = unix_find_socket_byinode(inode); in unix_find_other()
905 if (!u) in unix_find_other()
908 if (u->sk_type == type) in unix_find_other()
914 if (u->sk_type != type) { in unix_find_other()
915 sock_put(u); in unix_find_other()
920 u = unix_find_socket_byname(net, sunname, len, type, hash); in unix_find_other()
921 if (u) { in unix_find_other()
923 dentry = unix_sk(u)->path.dentry; in unix_find_other()
925 touch_atime(&unix_sk(u)->path); in unix_find_other()
929 return u; in unix_find_other()
971 struct unix_sock *u = unix_sk(sk); in unix_bind() local
993 err = mutex_lock_interruptible(&u->readlock); in unix_bind()
998 if (u->addr) in unix_bind()
1025 u->path = path; in unix_bind()
1041 u->addr = addr; in unix_bind()
1047 mutex_unlock(&u->readlock); in unix_bind()
1155 struct unix_sock *u = unix_sk(other); in unix_wait_for_peer() local
1159 prepare_to_wait_exclusive(&u->peer_wait, &wait, TASK_INTERRUPTIBLE); in unix_wait_for_peer()
1170 finish_wait(&u->peer_wait, &wait); in unix_wait_for_peer()
1180 struct unix_sock *u = unix_sk(sk), *newu, *otheru; in unix_stream_connect() local
1194 if (test_bit(SOCK_PASSCRED, &sock->flags) && !u->addr && in unix_stream_connect()
1426 struct unix_sock *u; in unix_getname() local
1441 u = unix_sk(sk); in unix_getname()
1443 if (!u->addr) { in unix_getname()
1448 struct unix_address *addr = u->addr; in unix_getname()
1578 struct unix_sock *u = unix_sk(sk); in unix_dgram_sendmsg() local
1613 if (test_bit(SOCK_PASSCRED, &sock->flags) && !u->addr in unix_dgram_sendmsg()
1919 struct unix_sock *u = unix_sk(sk); in unix_copy_addr() local
1921 if (u->addr) { in unix_copy_addr()
1922 msg->msg_namelen = u->addr->len; in unix_copy_addr()
1923 memcpy(msg->msg_name, u->addr->name, u->addr->len); in unix_copy_addr()
1932 struct unix_sock *u = unix_sk(sk); in unix_dgram_recvmsg() local
1942 err = mutex_lock_interruptible(&u->readlock); in unix_dgram_recvmsg()
1964 wake_up_interruptible_sync_poll(&u->peer_wait, in unix_dgram_recvmsg()
2018 mutex_unlock(&u->readlock); in unix_dgram_recvmsg()
2069 struct unix_sock *u = unix_sk(sk); in unix_stream_recvmsg() local
2096 mutex_lock(&u->readlock); in unix_stream_recvmsg()
2133 mutex_unlock(&u->readlock); in unix_stream_recvmsg()
2143 mutex_lock(&u->readlock); in unix_stream_recvmsg()
2227 mutex_unlock(&u->readlock); in unix_stream_recvmsg()
2512 struct unix_sock *u = unix_sk(s); in unix_seq_show() local
2526 if (u->addr) { in unix_seq_show()
2531 len = u->addr->len - sizeof(short); in unix_seq_show()
2539 seq_putc(seq, u->addr->name->sun_path[i]); in unix_seq_show()