summaryrefslogtreecommitdiffstats
path: root/net/netlink/af_netlink.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-07-24 12:47:56 +0200
committerDavid S. Miller <davem@davemloft.net>2018-07-24 10:04:49 -0700
commit3730cf4dd70b6a36e48d58a862120311411b77f5 (patch)
tree2c3f8b40770c5296d58e7e3e85135edcf7e071aa /net/netlink/af_netlink.c
parentc93622b53e7ab41baab2563df0ac425afd1b45c3 (diff)
downloadlinux-3730cf4dd70b6a36e48d58a862120311411b77f5.tar.gz
linux-3730cf4dd70b6a36e48d58a862120311411b77f5.tar.bz2
linux-3730cf4dd70b6a36e48d58a862120311411b77f5.zip
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: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink/af_netlink.c')
-rw-r--r--net/netlink/af_netlink.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 393573a99a5a..f6ac7693d2cc 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -2300,7 +2300,6 @@ int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
cb = &nlk->cb;
memset(cb, 0, sizeof(*cb));
- cb->start = control->start;
cb->dump = control->dump;
cb->done = control->done;
cb->nlh = nlh;
@@ -2309,8 +2308,8 @@ int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
cb->min_dump_alloc = control->min_dump_alloc;
cb->skb = skb;
- if (cb->start) {
- ret = cb->start(cb);
+ if (control->start) {
+ ret = control->start(cb);
if (ret)
goto error_put;
}