[PATCH][2.6.8-rc1-mm1] net/sunrpc/xprt.c gcc341 inlining fix

From: Mikael Pettersson
Date: Wed Jul 14 2004 - 07:22:23 EST


gcc-3.4.1 errors out in 2.6.8-rc1-mm1 at net/sunrpc/xprt.c:

net/sunrpc/xprt.c: In function `xprt_reserve':
net/sunrpc/xprt.c:84: sorry, unimplemented: inlining failed in call to 'do_xprt_reserve': function body not available
net/sunrpc/xprt.c:1307: sorry, unimplemented: called from here
make[2]: *** [net/sunrpc/xprt.o] Error 1
make[1]: *** [net/sunrpc] Error 2
make: *** [net] Error 2

do_xprt_reserve() is marked inline but used defore its function
body is available. Moving it before its only caller fixes the problem.

Signed-off-by: Mikael Pettersson <mikpe@xxxxxxxxx>

--- linux-2.6.8-rc1-mm1/net/sunrpc/xprt.c.~1~ 2004-07-14 12:58:35.000000000 +0200
+++ linux-2.6.8-rc1-mm1/net/sunrpc/xprt.c 2004-07-14 13:47:46.000000000 +0200
@@ -1296,21 +1296,6 @@
/*
* 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 @@
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
*/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/