]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/sunrpc/clnt.c
Merge branch 'for-3.9' of git://linux-nfs.org/~bfields/linux
[karo-tx-linux.git] / net / sunrpc / clnt.c
index c8193ce67b230c50e375ed206ac7e4c95c43a425..d7a369e61085119f2897aea276ab28fc8dc12fb5 100644 (file)
@@ -556,7 +556,7 @@ EXPORT_SYMBOL_GPL(rpc_clone_client);
  * rpc_clone_client_set_auth - Clone an RPC client structure and set its auth
  *
  * @clnt: RPC client whose parameters are copied
- * @auth: security flavor for new client
+ * @flavor: security flavor for new client
  *
  * Returns a fresh RPC client or an ERR_PTR.
  */
@@ -611,11 +611,6 @@ EXPORT_SYMBOL_GPL(rpc_killall_tasks);
  */
 void rpc_shutdown_client(struct rpc_clnt *clnt)
 {
-       /*
-        * To avoid deadlock, never call rpc_shutdown_client from a
-        * workqueue context!
-        */
-       WARN_ON_ONCE(current->flags & PF_WQ_WORKER);
        might_sleep();
 
        dprintk_rcu("RPC:       shutting down %s client for %s\n",
@@ -1406,7 +1401,7 @@ call_allocate(struct rpc_task *task)
 {
        unsigned int slack = task->tk_rqstp->rq_cred->cr_auth->au_cslack;
        struct rpc_rqst *req = task->tk_rqstp;
-       struct rpc_xprt *xprt = task->tk_xprt;
+       struct rpc_xprt *xprt = req->rq_xprt;
        struct rpc_procinfo *proc = task->tk_msg.rpc_proc;
 
        dprint_status(task);
@@ -1514,7 +1509,7 @@ rpc_xdr_encode(struct rpc_task *task)
 static void
 call_bind(struct rpc_task *task)
 {
-       struct rpc_xprt *xprt = task->tk_xprt;
+       struct rpc_xprt *xprt = task->tk_rqstp->rq_xprt;
 
        dprint_status(task);
 
@@ -1608,7 +1603,7 @@ retry_timeout:
 static void
 call_connect(struct rpc_task *task)
 {
-       struct rpc_xprt *xprt = task->tk_xprt;
+       struct rpc_xprt *xprt = task->tk_rqstp->rq_xprt;
 
        dprintk("RPC: %5u call_connect xprt %p %s connected\n",
                        task->tk_pid, xprt,
@@ -1691,7 +1686,7 @@ call_transmit(struct rpc_task *task)
        if (rpc_reply_expected(task))
                return;
        task->tk_action = rpc_exit_task;
-       rpc_wake_up_queued_task(&task->tk_xprt->pending, task);
+       rpc_wake_up_queued_task(&task->tk_rqstp->rq_xprt->pending, task);
 }
 
 /*
@@ -1790,7 +1785,7 @@ call_bc_transmit(struct rpc_task *task)
                 */
                printk(KERN_NOTICE "RPC: Could not send backchannel reply "
                        "error: %d\n", task->tk_status);
-               xprt_conditional_disconnect(task->tk_xprt,
+               xprt_conditional_disconnect(req->rq_xprt,
                        req->rq_connect_cookie);
                break;
        default:
@@ -1842,7 +1837,7 @@ call_status(struct rpc_task *task)
        case -ETIMEDOUT:
                task->tk_action = call_timeout;
                if (task->tk_client->cl_discrtry)
-                       xprt_conditional_disconnect(task->tk_xprt,
+                       xprt_conditional_disconnect(req->rq_xprt,
                                        req->rq_connect_cookie);
                break;
        case -ECONNRESET:
@@ -1997,7 +1992,7 @@ out_retry:
        if (task->tk_rqstp == req) {
                req->rq_reply_bytes_recvd = req->rq_rcv_buf.len = 0;
                if (task->tk_client->cl_discrtry)
-                       xprt_conditional_disconnect(task->tk_xprt,
+                       xprt_conditional_disconnect(req->rq_xprt,
                                        req->rq_connect_cookie);
        }
 }
@@ -2011,7 +2006,7 @@ rpc_encode_header(struct rpc_task *task)
 
        /* FIXME: check buffer size? */
 
-       p = xprt_skip_transport_header(task->tk_xprt, p);
+       p = xprt_skip_transport_header(req->rq_xprt, p);
        *p++ = req->rq_xid;             /* XID */
        *p++ = htonl(RPC_CALL);         /* CALL */
        *p++ = htonl(RPC_VERSION);      /* RPC version */