net/sunrpc/xprt.c: fix inline problem
Subsystems (4)
PATCH 1/1 net/sunrpc/xprt.c: fix inline problem
Trying to compile net/sunrpc/xprt.c with gcc 3.4 and
# define inline __inline__ __attribute__((always_inline)) results in the following error:
<-- snip -->
...
CC net/sunrpc/xprt.onet/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
<-- snip -->
The patch below moves the inline function in front of its' (only) caller.
diffstat output:
net/sunrpc/xprt.c | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-)
Signed-off-by Adrian Bunk <[email protected]>
net/sunrpc/xprt.c renamed from net/sunrpc/xprt.c.old +18 -18
@@ -1293,24 +1293,6 @@spin_unlock_bh (&xprt->sock_lock); } -/* -* 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) {
@@ -1333,6 +1315,24 @@ }/* +* 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); + } +} + +/* * Allocate a 'unique' XID */ static inline u32 xprt_alloc_xid (struct rpc_xprt *xprt)