diff options
author | Johannes Berg <johannes.berg@intel.com> | 2017-10-16 16:57:49 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-18 12:20:13 +0100 |
commit | a2084f5650624edd0805dc78260d097df4f38eb6 (patch) | |
tree | 5d356417907c15438b6f16933d8bfe823254b8c4 /net/dsa/slave.c | |
parent | 452606d6c9cd7cd6d1037d06763c687f617e795f (diff) | |
download | linux-a2084f5650624edd0805dc78260d097df4f38eb6.tar.gz |
netlink: use NETLINK_CB(in_skb).sk instead of looking it up
When netlink_ack() reports an allocation error to the sending
socket, there's no need to look up the sending socket since
it's available in the SKB's CB. Use that instead of going to
the trouble of looking it up.
Note that the pointer is only available since Eric Biederman's
commit 3fbc290540a1 ("netlink: Make the sending netlink socket availabe in NETLINK_CB")
which is far newer than the original lookup code (Oct 2003)
(though the field was called 'ssk' in that commit and only got
renamed to 'sk' later, I'd actually argue 'ssk' was better - or
perhaps it should've been 'source_sk' - since there are so many
different 'sk's involved.)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/slave.c')
0 files changed, 0 insertions, 0 deletions