]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipv4: refactor __ip_route_output_key_hash
authorDavid Ahern <dsahern@gmail.com>
Thu, 25 May 2017 17:42:33 +0000 (10:42 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 May 2017 18:12:49 +0000 (14:12 -0400)
commit1d8fd89c0004f8947e824996ce064176815c24ec
tree0efba1d15eda6d52a7fcc07fbc38bf796198ffa6
parent947b14e656c68bbaaafacfecf02ba94c096725cd
net: ipv4: refactor __ip_route_output_key_hash

A later patch wants access to the fib result on an output route lookup
with the rcu lock held. Refactor __ip_route_output_key_hash, pushing
the logic between rcu_read_lock ... rcu_read_unlock into a new helper
with the fib_result as an input arg.

To keep the name length under control remove the leading underscores
from the name and add _rcu to the name of the new helper indicating it
is called with the rcu read lock held.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/route.h
net/ipv4/icmp.c
net/ipv4/route.c