upgrade to linux 2.6.9-1.11_FC2
[linux-2.6.git] / net / sunrpc / xprt.c
index 5fbbe60..de4bccc 100644 (file)
@@ -753,7 +753,7 @@ udp_data_ready(struct sock *sk, int len)
        struct rpc_rqst *rovr;
        struct sk_buff  *skb;
        int err, repsize, copied;
-       u32 xid;
+       u32 _xid, *xp;
 
        read_lock(&sk->sk_callback_lock);
        dprintk("RPC:      udp_data_ready...\n");
@@ -777,12 +777,14 @@ udp_data_ready(struct sock *sk, int len)
        }
 
        /* Copy the XID from the skb... */
-       if (skb_copy_bits(skb, sizeof(struct udphdr), &xid, sizeof(xid)) < 0)
+       xp = skb_header_pointer(skb, sizeof(struct udphdr),
+                               sizeof(_xid), &_xid);
+       if (xp == NULL)
                goto dropit;
 
        /* Look up and lock the request corresponding to the given XID */
        spin_lock(&xprt->sock_lock);
-       rovr = xprt_lookup_rqst(xprt, xid);
+       rovr = xprt_lookup_rqst(xprt, *xp);
        if (!rovr)
                goto out_unlock;
        task = rovr->rq_task;
@@ -1296,21 +1298,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 +1319,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
  */