Commit 3730cf4d authored by Florian Westphal's avatar Florian Westphal Committed by David S. Miller

netlink: do not store start function in netlink_cb

->start() is called once when dump is being initialized, there is no
need to store it in netlink_cb.
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c93622b5
...@@ -170,7 +170,6 @@ netlink_skb_clone(struct sk_buff *skb, gfp_t gfp_mask) ...@@ -170,7 +170,6 @@ netlink_skb_clone(struct sk_buff *skb, gfp_t gfp_mask)
struct netlink_callback { struct netlink_callback {
struct sk_buff *skb; struct sk_buff *skb;
const struct nlmsghdr *nlh; const struct nlmsghdr *nlh;
int (*start)(struct netlink_callback *);
int (*dump)(struct sk_buff * skb, int (*dump)(struct sk_buff * skb,
struct netlink_callback *cb); struct netlink_callback *cb);
int (*done)(struct netlink_callback *cb); int (*done)(struct netlink_callback *cb);
......
...@@ -2300,7 +2300,6 @@ int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb, ...@@ -2300,7 +2300,6 @@ int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
cb = &nlk->cb; cb = &nlk->cb;
memset(cb, 0, sizeof(*cb)); memset(cb, 0, sizeof(*cb));
cb->start = control->start;
cb->dump = control->dump; cb->dump = control->dump;
cb->done = control->done; cb->done = control->done;
cb->nlh = nlh; cb->nlh = nlh;
...@@ -2309,8 +2308,8 @@ int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb, ...@@ -2309,8 +2308,8 @@ int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
cb->min_dump_alloc = control->min_dump_alloc; cb->min_dump_alloc = control->min_dump_alloc;
cb->skb = skb; cb->skb = skb;
if (cb->start) { if (control->start) {
ret = cb->start(cb); ret = control->start(cb);
if (ret) if (ret)
goto error_put; goto error_put;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment