Merge tag 'nfs-for-4.2-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
[firefly-linux-kernel-4.4.55.git] / net / sunrpc / svc.c
index e144902d382e7eff3b581f5df4f0c1be1177fd0b..5a16d8d8c831c4ad2805f5958b9ccef63449af82 100644 (file)
@@ -1290,7 +1290,6 @@ err_bad:
        svc_putnl(resv, ntohl(rpc_stat));
        goto sendit;
 }
-EXPORT_SYMBOL_GPL(svc_process);
 
 /*
  * Process the RPC request.
@@ -1338,6 +1337,7 @@ out_drop:
        svc_drop(rqstp);
        return 0;
 }
+EXPORT_SYMBOL_GPL(svc_process);
 
 #if defined(CONFIG_SUNRPC_BACKCHANNEL)
 /*
@@ -1350,8 +1350,8 @@ bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req,
 {
        struct kvec     *argv = &rqstp->rq_arg.head[0];
        struct kvec     *resv = &rqstp->rq_res.head[0];
-       static const struct rpc_call_ops reply_ops = { };
        struct rpc_task *task;
+       int proc_error;
        int error;
 
        dprintk("svc: %s(%p)\n", __func__, req);
@@ -1383,7 +1383,10 @@ bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req,
        svc_getnl(argv);        /* CALLDIR */
 
        /* Parse and execute the bc call */
-       if (!svc_process_common(rqstp, argv, resv)) {
+       proc_error = svc_process_common(rqstp, argv, resv);
+
+       atomic_inc(&req->rq_xprt->bc_free_slots);
+       if (!proc_error) {
                /* Processing error: drop the request */
                xprt_free_bc_request(req);
                return 0;
@@ -1391,7 +1394,7 @@ bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req,
 
        /* Finally, send the reply synchronously */
        memcpy(&req->rq_snd_buf, &rqstp->rq_res, sizeof(req->rq_snd_buf));
-       task = rpc_run_bc_task(req, &reply_ops);
+       task = rpc_run_bc_task(req);
        if (IS_ERR(task)) {
                error = PTR_ERR(task);
                goto out;