Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183987
b: refs/heads/master
c: efaffb7
h: refs/heads/master
i:
  183985: 9a5bb1a
  183983: 9068592
v: v3
  • Loading branch information
Li Zefan authored and David S. Miller committed Feb 10, 2010
1 parent 70b2ece commit 5a04b37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 28 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: b512f3d841370aedee9a2c24a14a0ab5fc0a02b2
refs/heads/master: efaffb78d875a155b9f327532c2ddccf28c592b4
30 changes: 3 additions & 27 deletions trunk/net/appletalk/atalk_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,40 +144,16 @@ static int atalk_seq_route_show(struct seq_file *seq, void *v)
return 0;
}

static __inline__ struct sock *atalk_get_socket_idx(loff_t pos)
{
struct sock *s;
struct hlist_node *node;

sk_for_each(s, node, &atalk_sockets)
if (!pos--)
goto found;
s = NULL;
found:
return s;
}

static void *atalk_seq_socket_start(struct seq_file *seq, loff_t *pos)
__acquires(atalk_sockets_lock)
{
loff_t l = *pos;

read_lock_bh(&atalk_sockets_lock);
return l ? atalk_get_socket_idx(--l) : SEQ_START_TOKEN;
return seq_hlist_start_head(&atalk_sockets, *pos);
}

static void *atalk_seq_socket_next(struct seq_file *seq, void *v, loff_t *pos)
{
struct sock *i;

++*pos;
if (v == SEQ_START_TOKEN) {
i = sk_head(&atalk_sockets);
goto out;
}
i = sk_next(v);
out:
return i;
return seq_hlist_next(v, &atalk_sockets, pos);
}

static void atalk_seq_socket_stop(struct seq_file *seq, void *v)
Expand All @@ -197,7 +173,7 @@ static int atalk_seq_socket_show(struct seq_file *seq, void *v)
goto out;
}

s = v;
s = sk_entry(v);
at = at_sk(s);

seq_printf(seq, "%02X %04X:%02X:%02X %04X:%02X:%02X %08X:%08X "
Expand Down

0 comments on commit 5a04b37

Please sign in to comment.