]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sunrpc/xprtsock.c
[POWERPC] Add of_translate_dma_address
[linux-2.6-omap-h63xx.git] / net / sunrpc / xprtsock.c
index b81494a97a5eee791474fcc5d8d180d54bbaee07..2f630a512ab753f7e2df18a42a2abb02f04893ba 100644 (file)
@@ -587,12 +587,13 @@ static int xs_udp_send_request(struct rpc_task *task)
        dprintk("RPC:       xs_udp_send_request(%u) = %d\n",
                        xdr->len - req->rq_bytes_sent, status);
 
-       if (likely(status >= (int) req->rq_slen))
-               return 0;
-
-       /* Still some bytes left; set up for a retry later. */
-       if (status > 0)
+       if (status >= 0) {
+               task->tk_bytes_sent += status;
+               if (status >= req->rq_slen)
+                       return 0;
+               /* Still some bytes left; set up for a retry later. */
                status = -EAGAIN;
+       }
 
        switch (status) {
        case -ENETUNREACH:
@@ -1349,7 +1350,7 @@ static inline void xs_reclassify_socket4(struct socket *sock)
 {
        struct sock *sk = sock->sk;
 
-       BUG_ON(sk->sk_lock.owner != NULL);
+       BUG_ON(sock_owned_by_user(sk));
        sock_lock_init_class_and_name(sk, "slock-AF_INET-RPC",
                &xs_slock_key[0], "sk_lock-AF_INET-RPC", &xs_key[0]);
 }
@@ -1358,7 +1359,7 @@ static inline void xs_reclassify_socket6(struct socket *sock)
 {
        struct sock *sk = sock->sk;
 
-       BUG_ON(sk->sk_lock.owner != NULL);
+       BUG_ON(sock_owned_by_user(sk));
        sock_lock_init_class_and_name(sk, "slock-AF_INET6-RPC",
                &xs_slock_key[1], "sk_lock-AF_INET6-RPC", &xs_key[1]);
 }
@@ -1827,7 +1828,7 @@ static struct rpc_xprt *xs_setup_xprt(struct xprt_create *args,
  * @args: rpc transport creation arguments
  *
  */
-struct rpc_xprt *xs_setup_udp(struct xprt_create *args)
+static struct rpc_xprt *xs_setup_udp(struct xprt_create *args)
 {
        struct sockaddr *addr = args->dstaddr;
        struct rpc_xprt *xprt;
@@ -1893,7 +1894,7 @@ struct rpc_xprt *xs_setup_udp(struct xprt_create *args)
  * @args: rpc transport creation arguments
  *
  */
-struct rpc_xprt *xs_setup_tcp(struct xprt_create *args)
+static struct rpc_xprt *xs_setup_tcp(struct xprt_create *args)
 {
        struct sockaddr *addr = args->dstaddr;
        struct rpc_xprt *xprt;