Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13669
b: refs/heads/master
c: a8f74b2
h: refs/heads/master
i:
  13667: 94b0af5
v: v3
  • Loading branch information
Thomas Graf authored and Thomas Graf committed Nov 10, 2005
1 parent e2da65d commit bbc5e08
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 26 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: bfa83a9e03cf8d501c6272999843470afecb32ed
refs/heads/master: a8f74b228826eef1cbe04a05647d61e896f5fd63
8 changes: 1 addition & 7 deletions trunk/net/core/rtnetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,6 @@ void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change)
netlink_broadcast(rtnl, skb, 0, RTNLGRP_LINK, GFP_KERNEL);
}

static int rtnetlink_done(struct netlink_callback *cb)
{
return 0;
}

/* Protected by RTNL sempahore. */
static struct rtattr **rta_buf;
static int rtattr_max;
Expand Down Expand Up @@ -533,8 +528,7 @@ rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, int *errp)
goto err_inval;

if ((*errp = netlink_dump_start(rtnl, skb, nlh,
link->dumpit,
rtnetlink_done)) != 0) {
link->dumpit, NULL)) != 0) {
return -1;
}
rlen = NLMSG_ALIGN(nlh->nlmsg_len);
Expand Down
9 changes: 1 addition & 8 deletions trunk/net/ipv4/inet_diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,12 +724,6 @@ static int inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb)
return skb->len;
}

static int inet_diag_dump_done(struct netlink_callback *cb)
{
return 0;
}


static __inline__ int
inet_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
{
Expand Down Expand Up @@ -760,8 +754,7 @@ inet_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
goto err_inval;
}
return netlink_dump_start(idiagnl, skb, nlh,
inet_diag_dump,
inet_diag_dump_done);
inet_diag_dump, NULL);
} else {
return inet_diag_get_exact(skb, nlh);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1710,7 +1710,7 @@ static void fib6_dump_end(struct netlink_callback *cb)
static int fib6_dump_done(struct netlink_callback *cb)
{
fib6_dump_end(cb);
return cb->done(cb);
return cb->done ? cb->done(cb) : 0;
}

int inet6_dump_fib(struct sk_buff *skb, struct netlink_callback *cb)
Expand Down
6 changes: 4 additions & 2 deletions trunk/net/netlink/af_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,8 @@ static int netlink_release(struct socket *sock)

spin_lock(&nlk->cb_lock);
if (nlk->cb) {
nlk->cb->done(nlk->cb);
if (nlk->cb->done)
nlk->cb->done(nlk->cb);
netlink_destroy_callback(nlk->cb);
nlk->cb = NULL;
}
Expand Down Expand Up @@ -1322,7 +1323,8 @@ static int netlink_dump(struct sock *sk)
skb_queue_tail(&sk->sk_receive_queue, skb);
sk->sk_data_ready(sk, skb->len);

cb->done(cb);
if (cb->done)
cb->done(cb);
nlk->cb = NULL;
spin_unlock(&nlk->cb_lock);

Expand Down
8 changes: 1 addition & 7 deletions trunk/net/xfrm/xfrm_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,11 +948,6 @@ static struct xfrm_link {
[XFRM_MSG_FLUSHPOLICY - XFRM_MSG_BASE] = { .doit = xfrm_flush_policy },
};

static int xfrm_done(struct netlink_callback *cb)
{
return 0;
}

static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, int *errp)
{
struct rtattr *xfrma[XFRMA_MAX];
Expand Down Expand Up @@ -990,8 +985,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, int *err
goto err_einval;

if ((*errp = netlink_dump_start(xfrm_nl, skb, nlh,
link->dump,
xfrm_done)) != 0) {
link->dump, NULL)) != 0) {
return -1;
}
rlen = NLMSG_ALIGN(nlh->nlmsg_len);
Expand Down

0 comments on commit bbc5e08

Please sign in to comment.