Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278806
b: refs/heads/master
c: fa7ff56
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Dec 16, 2011
1 parent a094f1c commit 0f0cd11
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f65c1b534b99aef1809b893387b295963821549f
refs/heads/master: fa7ff56f75add89bbedaf2dfcfa8f6661e8e8b3a
3 changes: 3 additions & 0 deletions trunk/include/net/af_unix.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ extern void unix_notinflight(struct file *fp);
extern void unix_gc(void);
extern void wait_for_unix_gc(void);
extern struct sock *unix_get_socket(struct file *filp);
extern struct sock *unix_peer_get(struct sock *);

#define UNIX_HASH_SIZE 256

extern unsigned int unix_tot_inflight;
extern spinlock_t unix_table_lock;
extern struct hlist_head unix_socket_table[UNIX_HASH_SIZE + 1];

struct unix_address {
atomic_t refcnt;
Expand Down
9 changes: 6 additions & 3 deletions trunk/net/unix/af_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@
#include <net/checksum.h>
#include <linux/security.h>

static struct hlist_head unix_socket_table[UNIX_HASH_SIZE + 1];
static DEFINE_SPINLOCK(unix_table_lock);
struct hlist_head unix_socket_table[UNIX_HASH_SIZE + 1];
EXPORT_SYMBOL_GPL(unix_socket_table);
DEFINE_SPINLOCK(unix_table_lock);
EXPORT_SYMBOL_GPL(unix_table_lock);
static atomic_long_t unix_nr_socks;

#define unix_sockets_unbound (&unix_socket_table[UNIX_HASH_SIZE])
Expand Down Expand Up @@ -172,7 +174,7 @@ static inline int unix_recvq_full(struct sock const *sk)
return skb_queue_len(&sk->sk_receive_queue) > sk->sk_max_ack_backlog;
}

static struct sock *unix_peer_get(struct sock *s)
struct sock *unix_peer_get(struct sock *s)
{
struct sock *peer;

Expand All @@ -183,6 +185,7 @@ static struct sock *unix_peer_get(struct sock *s)
unix_state_unlock(s);
return peer;
}
EXPORT_SYMBOL_GPL(unix_peer_get);

static inline void unix_release_addr(struct unix_address *addr)
{
Expand Down

0 comments on commit 0f0cd11

Please sign in to comment.