Commit 9e943963 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] inline fixes in net/*

* 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: default avatarAl Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6e0418be
...@@ -584,7 +584,24 @@ static void ip6_rt_update_pmtu(struct dst_entry *dst, u32 mtu) ...@@ -584,7 +584,24 @@ static void ip6_rt_update_pmtu(struct dst_entry *dst, u32 mtu)
/* Protected by rt6_lock. */ /* Protected by rt6_lock. */
static struct dst_entry *ndisc_dst_gc_list; static struct dst_entry *ndisc_dst_gc_list;
static int ipv6_get_mtu(struct net_device *dev); 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 dst_entry *ndisc_dst_alloc(struct net_device *dev,
struct neighbour *neigh, struct neighbour *neigh,
...@@ -692,24 +709,6 @@ static int ipv6_get_mtu(struct net_device *dev) ...@@ -692,24 +709,6 @@ static int ipv6_get_mtu(struct net_device *dev)
return mtu; 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) static int ipv6_get_hoplimit(struct net_device *dev)
{ {
int hoplimit = ipv6_devconf.hop_limit; int hoplimit = ipv6_devconf.hop_limit;
......
...@@ -1296,21 +1296,6 @@ xprt_transmit(struct rpc_task *task) ...@@ -1296,21 +1296,6 @@ xprt_transmit(struct rpc_task *task)
/* /*
* Reserve an RPC call slot. * 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 static inline void
do_xprt_reserve(struct rpc_task *task) do_xprt_reserve(struct rpc_task *task)
{ {
...@@ -1332,6 +1317,21 @@ 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); 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 * Allocate a 'unique' XID
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment