]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
net: change the type of ip_route_input_rcu to static
authorZhengchao Shao <shaozhengchao@huawei.com>
Mon, 11 Jul 2022 07:35:49 +0000 (15:35 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 12 Jul 2022 13:08:45 +0000 (15:08 +0200)
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>
include/net/route.h
net/ipv4/route.c

index 991a3985712dcb555ff3bd08f15e7f5dad4d1469..651424ef09c9d7428d5420686704cadefba1fc09 100644 (file)
@@ -201,10 +201,6 @@ int ip_mc_validate_source(struct sk_buff *skb, __be32 daddr, __be32 saddr,
                          struct in_device *in_dev, u32 *itag);
 int ip_route_input_noref(struct sk_buff *skb, __be32 dst, __be32 src,
                         u8 tos, struct net_device *devin);
-int ip_route_input_rcu(struct sk_buff *skb, __be32 dst, __be32 src,
-                      u8 tos, struct net_device *devin,
-                      struct fib_result *res);
-
 int ip_route_use_hint(struct sk_buff *skb, __be32 dst, __be32 src,
                      u8 tos, struct net_device *devin,
                      const struct sk_buff *hint);
index 2d16bcc7d3461af1690084fee1ddb335cb7040c3..8f4a8f66d604ab69fe6a9c4b5395d40d5780b9f0 100644 (file)
@@ -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,