aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2007-02-09 09:25:23 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-11 02:20:18 -0500
commitac7bfa62f3ad06a2a2ac3938b7e6fc4f318a762d (patch)
treefbac1719544df7f547be17e042478c03605c2a90 /net/unix/af_unix.c
parentc43072852649d8382b81237ce51195bcec36f24a (diff)
[NET] UNIX: Fix whitespace errors.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r--net/unix/af_unix.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 2f208c7f4d43..ac9478d0ca8b 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -195,7 +195,7 @@ static inline void unix_release_addr(struct unix_address *addr)
195 * - if started by not zero, should be NULL terminated (FS object) 195 * - if started by not zero, should be NULL terminated (FS object)
196 * - if started by zero, it is abstract name. 196 * - if started by zero, it is abstract name.
197 */ 197 */
198 198
199static int unix_mkname(struct sockaddr_un * sunaddr, int len, unsigned *hashp) 199static int unix_mkname(struct sockaddr_un * sunaddr, int len, unsigned *hashp)
200{ 200{
201 if (len <= sizeof(short) || len > sizeof(*sunaddr)) 201 if (len <= sizeof(short) || len > sizeof(*sunaddr))
@@ -432,7 +432,7 @@ static int unix_release_sock (struct sock *sk, int embrion)
432 */ 432 */
433 433
434 if (atomic_read(&unix_tot_inflight)) 434 if (atomic_read(&unix_tot_inflight))
435 unix_gc(); /* Garbage collect fds */ 435 unix_gc(); /* Garbage collect fds */
436 436
437 return 0; 437 return 0;
438} 438}
@@ -698,7 +698,7 @@ static struct sock *unix_find_other(struct sockaddr_un *sunname, int len,
698 struct sock *u; 698 struct sock *u;
699 struct nameidata nd; 699 struct nameidata nd;
700 int err = 0; 700 int err = 0;
701 701
702 if (sunname->sun_path[0]) { 702 if (sunname->sun_path[0]) {
703 err = path_lookup(sunname->sun_path, LOOKUP_FOLLOW, &nd); 703 err = path_lookup(sunname->sun_path, LOOKUP_FOLLOW, &nd);
704 if (err) 704 if (err)
@@ -915,7 +915,7 @@ static int unix_dgram_connect(struct socket *sock, struct sockaddr *addr,
915 unix_peer(sk)=other; 915 unix_peer(sk)=other;
916 unix_state_wunlock(sk); 916 unix_state_wunlock(sk);
917 } 917 }
918 return 0; 918 return 0;
919 919
920out_unlock: 920out_unlock:
921 unix_state_wunlock(sk); 921 unix_state_wunlock(sk);
@@ -1021,7 +1021,7 @@ restart:
1021 goto out; 1021 goto out;
1022 sock_put(other); 1022 sock_put(other);
1023 goto restart; 1023 goto restart;
1024 } 1024 }
1025 1025
1026 /* Latch our state. 1026 /* Latch our state.
1027 1027
@@ -1415,7 +1415,7 @@ out:
1415 return err; 1415 return err;
1416} 1416}
1417 1417
1418 1418
1419static int unix_stream_sendmsg(struct kiocb *kiocb, struct socket *sock, 1419static int unix_stream_sendmsg(struct kiocb *kiocb, struct socket *sock,
1420 struct msghdr *msg, size_t len) 1420 struct msghdr *msg, size_t len)
1421{ 1421{
@@ -1467,11 +1467,11 @@ static int unix_stream_sendmsg(struct kiocb *kiocb, struct socket *sock,
1467 1467
1468 if (size > SKB_MAX_ALLOC) 1468 if (size > SKB_MAX_ALLOC)
1469 size = SKB_MAX_ALLOC; 1469 size = SKB_MAX_ALLOC;
1470 1470
1471 /* 1471 /*
1472 * Grab a buffer 1472 * Grab a buffer
1473 */ 1473 */
1474 1474
1475 skb=sock_alloc_send_skb(sk,size,msg->msg_flags&MSG_DONTWAIT, &err); 1475 skb=sock_alloc_send_skb(sk,size,msg->msg_flags&MSG_DONTWAIT, &err);
1476 1476
1477 if (skb==NULL) 1477 if (skb==NULL)
@@ -1530,7 +1530,7 @@ static int unix_seqpacket_sendmsg(struct kiocb *kiocb, struct socket *sock,
1530{ 1530{
1531 int err; 1531 int err;
1532 struct sock *sk = sock->sk; 1532 struct sock *sk = sock->sk;
1533 1533
1534 err = sock_error(sk); 1534 err = sock_error(sk);
1535 if (err) 1535 if (err)
1536 return err; 1536 return err;
@@ -1543,7 +1543,7 @@ static int unix_seqpacket_sendmsg(struct kiocb *kiocb, struct socket *sock,
1543 1543
1544 return unix_dgram_sendmsg(kiocb, sock, msg, len); 1544 return unix_dgram_sendmsg(kiocb, sock, msg, len);
1545} 1545}
1546 1546
1547static void unix_copy_addr(struct msghdr *msg, struct sock *sk) 1547static void unix_copy_addr(struct msghdr *msg, struct sock *sk)
1548{ 1548{
1549 struct unix_sock *u = unix_sk(sk); 1549 struct unix_sock *u = unix_sk(sk);
@@ -1605,7 +1605,7 @@ static int unix_dgram_recvmsg(struct kiocb *iocb, struct socket *sock,
1605 if (UNIXCB(skb).fp) 1605 if (UNIXCB(skb).fp)
1606 unix_detach_fds(siocb->scm, skb); 1606 unix_detach_fds(siocb->scm, skb);
1607 } 1607 }
1608 else 1608 else
1609 { 1609 {
1610 /* It is questionable: on PEEK we could: 1610 /* It is questionable: on PEEK we could:
1611 - do not return fds - good, but too simple 8) 1611 - do not return fds - good, but too simple 8)
@@ -1613,11 +1613,11 @@ static int unix_dgram_recvmsg(struct kiocb *iocb, struct socket *sock,
1613 apparently wrong) 1613 apparently wrong)
1614 - clone fds (I chose it for now, it is the most universal 1614 - clone fds (I chose it for now, it is the most universal
1615 solution) 1615 solution)
1616 1616
1617 POSIX 1003.1g does not actually define this clearly 1617 POSIX 1003.1g does not actually define this clearly
1618 at all. POSIX 1003.1g doesn't define a lot of things 1618 at all. POSIX 1003.1g doesn't define a lot of things
1619 clearly however! 1619 clearly however!
1620 1620
1621 */ 1621 */
1622 if (UNIXCB(skb).fp) 1622 if (UNIXCB(skb).fp)
1623 siocb->scm->fp = scm_fp_dup(UNIXCB(skb).fp); 1623 siocb->scm->fp = scm_fp_dup(UNIXCB(skb).fp);
@@ -1637,7 +1637,7 @@ out:
1637/* 1637/*
1638 * Sleep until data has arrive. But check for races.. 1638 * Sleep until data has arrive. But check for races..
1639 */ 1639 */
1640 1640
1641static long unix_stream_data_wait(struct sock * sk, long timeo) 1641static long unix_stream_data_wait(struct sock * sk, long timeo)
1642{ 1642{
1643 DEFINE_WAIT(wait); 1643 DEFINE_WAIT(wait);
@@ -1721,7 +1721,7 @@ static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
1721 /* 1721 /*
1722 * POSIX 1003.1g mandates this order. 1722 * POSIX 1003.1g mandates this order.
1723 */ 1723 */
1724 1724
1725 if ((err = sock_error(sk)) != 0) 1725 if ((err = sock_error(sk)) != 0)
1726 break; 1726 break;
1727 if (sk->sk_shutdown & RCV_SHUTDOWN) 1727 if (sk->sk_shutdown & RCV_SHUTDOWN)
@@ -1937,7 +1937,7 @@ static struct sock *unix_seq_idx(int *iter, loff_t pos)
1937 struct sock *s; 1937 struct sock *s;
1938 1938
1939 for (s = first_unix_socket(iter); s; s = next_unix_socket(iter, s)) { 1939 for (s = first_unix_socket(iter); s; s = next_unix_socket(iter, s)) {
1940 if (off == pos) 1940 if (off == pos)
1941 return s; 1941 return s;
1942 ++off; 1942 ++off;
1943 } 1943 }
@@ -1955,7 +1955,7 @@ static void *unix_seq_next(struct seq_file *seq, void *v, loff_t *pos)
1955{ 1955{
1956 ++*pos; 1956 ++*pos;
1957 1957
1958 if (v == (void *)1) 1958 if (v == (void *)1)
1959 return first_unix_socket(seq->private); 1959 return first_unix_socket(seq->private);
1960 return next_unix_socket(seq->private, v); 1960 return next_unix_socket(seq->private, v);
1961} 1961}
@@ -1967,7 +1967,7 @@ static void unix_seq_stop(struct seq_file *seq, void *v)
1967 1967
1968static int unix_seq_show(struct seq_file *seq, void *v) 1968static int unix_seq_show(struct seq_file *seq, void *v)
1969{ 1969{
1970 1970
1971 if (v == (void *)1) 1971 if (v == (void *)1)
1972 seq_puts(seq, "Num RefCount Protocol Flags Type St " 1972 seq_puts(seq, "Num RefCount Protocol Flags Type St "
1973 "Inode Path\n"); 1973 "Inode Path\n");
@@ -2064,8 +2064,8 @@ static int __init af_unix_init(void)
2064 BUILD_BUG_ON(sizeof(struct unix_skb_parms) > sizeof(dummy_skb->cb)); 2064 BUILD_BUG_ON(sizeof(struct unix_skb_parms) > sizeof(dummy_skb->cb));
2065 2065
2066 rc = proto_register(&unix_proto, 1); 2066 rc = proto_register(&unix_proto, 1);
2067 if (rc != 0) { 2067 if (rc != 0) {
2068 printk(KERN_CRIT "%s: Cannot create unix_sock SLAB cache!\n", 2068 printk(KERN_CRIT "%s: Cannot create unix_sock SLAB cache!\n",
2069 __FUNCTION__); 2069 __FUNCTION__);
2070 goto out; 2070 goto out;
2071 } 2071 }