diff options
author | Zhengchao Shao <shaozhengchao@huawei.com> | 2022-07-11 15:35:49 +0800 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-07-12 15:08:45 +0200 |
commit | 5022e221c98a609e0e5b0a73852c7e3d32f1c545 (patch) | |
tree | db5266047e50749e5f694d9775c9ce694f3611c2 /net/ipv4/route.c | |
parent | bfc54866856ffe2cb82886337afdece7703f2415 (diff) | |
download | linux-5022e221c98a609e0e5b0a73852c7e3d32f1c545.tar.gz linux-5022e221c98a609e0e5b0a73852c7e3d32f1c545.tar.bz2 linux-5022e221c98a609e0e5b0a73852c7e3d32f1c545.zip |
net: change the type of ip_route_input_rcu to static
The type of ip_route_input_rcu should be static.
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Link: https://lore.kernel.org/r/20220711073549.8947-1-shaozhengchao@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 2d16bcc7d346..8f4a8f66d604 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -2439,24 +2439,9 @@ martian_source: goto out; } -int ip_route_input_noref(struct sk_buff *skb, __be32 daddr, __be32 saddr, - u8 tos, struct net_device *dev) -{ - struct fib_result res; - int err; - - tos &= IPTOS_RT_MASK; - rcu_read_lock(); - err = ip_route_input_rcu(skb, daddr, saddr, tos, dev, &res); - rcu_read_unlock(); - - return err; -} -EXPORT_SYMBOL(ip_route_input_noref); - /* called with rcu_read_lock held */ -int ip_route_input_rcu(struct sk_buff *skb, __be32 daddr, __be32 saddr, - u8 tos, struct net_device *dev, struct fib_result *res) +static int ip_route_input_rcu(struct sk_buff *skb, __be32 daddr, __be32 saddr, + u8 tos, struct net_device *dev, struct fib_result *res) { /* Multicast recognition logic is moved from route cache to here. * The problem was that too many Ethernet cards have broken/missing @@ -2505,6 +2490,21 @@ int ip_route_input_rcu(struct sk_buff *skb, __be32 daddr, __be32 saddr, return ip_route_input_slow(skb, daddr, saddr, tos, dev, res); } +int ip_route_input_noref(struct sk_buff *skb, __be32 daddr, __be32 saddr, + u8 tos, struct net_device *dev) +{ + struct fib_result res; + int err; + + tos &= IPTOS_RT_MASK; + rcu_read_lock(); + err = ip_route_input_rcu(skb, daddr, saddr, tos, dev, &res); + rcu_read_unlock(); + + return err; +} +EXPORT_SYMBOL(ip_route_input_noref); + /* called with rcu_read_lock() */ static struct rtable *__mkroute_output(const struct fib_result *res, const struct flowi4 *fl4, int orig_oif, |