Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183988
b: refs/heads/master
c: 27b5b86
h: refs/heads/master
v: v3
  • Loading branch information
Li Zefan authored and David S. Miller committed Feb 10, 2010
1 parent 5a04b37 commit 96186ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 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: efaffb78d875a155b9f327532c2ddccf28c592b4
refs/heads/master: 27b5b8657a2aa761f76e45fa60c20b7bafc249dc
20 changes: 3 additions & 17 deletions trunk/net/key/af_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -3654,9 +3654,8 @@ static const struct net_proto_family pfkey_family_ops = {
#ifdef CONFIG_PROC_FS
static int pfkey_seq_show(struct seq_file *f, void *v)
{
struct sock *s;
struct sock *s = sk_entry(v);

s = (struct sock *)v;
if (v == SEQ_START_TOKEN)
seq_printf(f ,"sk RefCnt Rmem Wmem User Inode\n");
else
Expand All @@ -3675,30 +3674,17 @@ static void *pfkey_seq_start(struct seq_file *f, loff_t *ppos)
{
struct net *net = seq_file_net(f);
struct netns_pfkey *net_pfkey = net_generic(net, pfkey_net_id);
struct sock *s;
struct hlist_node *node;
loff_t pos = *ppos;

read_lock(&pfkey_table_lock);
if (pos == 0)
return SEQ_START_TOKEN;

sk_for_each(s, node, &net_pfkey->table)
if (pos-- == 1)
return s;

return NULL;
return seq_hlist_start_head(&net_pfkey->table, *ppos);
}

static void *pfkey_seq_next(struct seq_file *f, void *v, loff_t *ppos)
{
struct net *net = seq_file_net(f);
struct netns_pfkey *net_pfkey = net_generic(net, pfkey_net_id);

++*ppos;
return (v == SEQ_START_TOKEN) ?
sk_head(&net_pfkey->table) :
sk_next((struct sock *)v);
return seq_hlist_next(v, &net_pfkey->table, ppos);
}

static void pfkey_seq_stop(struct seq_file *f, void *v)
Expand Down

0 comments on commit 96186ec

Please sign in to comment.