]> git.hungrycats.org Git - linux/commitdiff
[PATCH] inline fixes in net/*
authorAlexander Viro <viro@www.linux.org.uk>
Fri, 30 Jul 2004 15:47:05 +0000 (08:47 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 30 Jul 2004 15:47:05 +0000 (08:47 -0700)
* in ipv6/route.c: made ipv6_advmss() inlined again (and moved it up)
* in sunrpc/xprt.c: inlining fix: moved do_xprt_reserve() up

Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
net/ipv6/route.c
net/sunrpc/xprt.c

index a6b6a1be88b11a1e2cbca89fa806e01926e30f11..143543f262a6deb0a1bbf78a6da990b8ed3f40a1 100644 (file)
@@ -584,7 +584,24 @@ static void ip6_rt_update_pmtu(struct dst_entry *dst, u32 mtu)
 /* Protected by rt6_lock.  */
 static struct dst_entry *ndisc_dst_gc_list;
 static int ipv6_get_mtu(struct net_device *dev);
-static unsigned int ipv6_advmss(unsigned int mtu);
+
+static inline unsigned int ipv6_advmss(unsigned int mtu)
+{
+       mtu -= sizeof(struct ipv6hdr) + sizeof(struct tcphdr);
+
+       if (mtu < ip6_rt_min_advmss)
+               mtu = ip6_rt_min_advmss;
+
+       /*
+        * Maximal non-jumbo IPv6 payload is IPV6_MAXPLEN and 
+        * corresponding MSS is IPV6_MAXPLEN - tcp_header_size. 
+        * IPV6_MAXPLEN is also valid and means: "any MSS, 
+        * rely only on pmtu discovery"
+        */
+       if (mtu > IPV6_MAXPLEN - sizeof(struct tcphdr))
+               mtu = IPV6_MAXPLEN;
+       return mtu;
+}
 
 struct dst_entry *ndisc_dst_alloc(struct net_device *dev, 
                                  struct neighbour *neigh,
@@ -692,24 +709,6 @@ static int ipv6_get_mtu(struct net_device *dev)
        return mtu;
 }
 
-static unsigned int ipv6_advmss(unsigned int mtu)
-{
-       mtu -= sizeof(struct ipv6hdr) + sizeof(struct tcphdr);
-
-       if (mtu < ip6_rt_min_advmss)
-               mtu = ip6_rt_min_advmss;
-
-       /*
-        * Maximal non-jumbo IPv6 payload is IPV6_MAXPLEN and 
-        * corresponding MSS is IPV6_MAXPLEN - tcp_header_size. 
-        * IPV6_MAXPLEN is also valid and means: "any MSS, 
-        * rely only on pmtu discovery"
-        */
-       if (mtu > IPV6_MAXPLEN - sizeof(struct tcphdr))
-               mtu = IPV6_MAXPLEN;
-       return mtu;
-}
-
 static int ipv6_get_hoplimit(struct net_device *dev)
 {
        int hoplimit = ipv6_devconf.hop_limit;
index 5fbbe608b14f5c35246853fd4d42ed25416f0ffb..a7ab07fe5cc04dd38a762630d90fe2aa31ec4d02 100644 (file)
@@ -1296,21 +1296,6 @@ xprt_transmit(struct rpc_task *task)
 /*
  * Reserve an RPC call slot.
  */
-void
-xprt_reserve(struct rpc_task *task)
-{
-       struct rpc_xprt *xprt = task->tk_xprt;
-
-       task->tk_status = -EIO;
-       if (!xprt->shutdown) {
-               spin_lock(&xprt->xprt_lock);
-               do_xprt_reserve(task);
-               spin_unlock(&xprt->xprt_lock);
-               if (task->tk_rqstp)
-                       del_timer_sync(&xprt->timer);
-       }
-}
-
 static inline void
 do_xprt_reserve(struct rpc_task *task)
 {
@@ -1332,6 +1317,21 @@ do_xprt_reserve(struct rpc_task *task)
        rpc_sleep_on(&xprt->backlog, task, NULL, NULL);
 }
 
+void
+xprt_reserve(struct rpc_task *task)
+{
+       struct rpc_xprt *xprt = task->tk_xprt;
+
+       task->tk_status = -EIO;
+       if (!xprt->shutdown) {
+               spin_lock(&xprt->xprt_lock);
+               do_xprt_reserve(task);
+               spin_unlock(&xprt->xprt_lock);
+               if (task->tk_rqstp)
+                       del_timer_sync(&xprt->timer);
+       }
+}
+
 /*
  * Allocate a 'unique' XID
  */