summaryrefslogtreecommitdiff
path: root/net/sunrpc/xprt.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2018-08-24 23:28:28 +0300
committerTrond Myklebust <trond.myklebust@hammerspace.com>2018-09-30 22:35:15 +0300
commit762e4e67b356ab7b8fbfc39bc07dc6110121505e (patch)
treea7d02d535e91ee95990c0df61ed73ef67b198d5b /net/sunrpc/xprt.c
parent944b042921a17d1a4e51bb05f8edf2b93d26e36f (diff)
downloadlinux-762e4e67b356ab7b8fbfc39bc07dc6110121505e.tar.xz
SUNRPC: Refactor RPC call encoding
Move the call encoding so that it occurs before the transport connection etc. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'net/sunrpc/xprt.c')
-rw-r--r--net/sunrpc/xprt.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 1f69d9f219af..613f558a3791 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -1059,17 +1059,9 @@ void xprt_request_wait_receive(struct rpc_task *task)
}
static bool
-xprt_request_need_transmit(struct rpc_task *task)
-{
- return !(task->tk_flags & RPC_TASK_NO_RETRANS_TIMEOUT) ||
- xprt_request_retransmit_after_disconnect(task);
-}
-
-static bool
xprt_request_need_enqueue_transmit(struct rpc_task *task, struct rpc_rqst *req)
{
- return xprt_request_need_transmit(task) &&
- !test_bit(RPC_TASK_NEED_XMIT, &task->tk_runstate);
+ return !test_bit(RPC_TASK_NEED_XMIT, &task->tk_runstate);
}
/**
@@ -1125,6 +1117,18 @@ xprt_request_dequeue_transmit(struct rpc_task *task)
}
/**
+ * xprt_request_need_retransmit - Test if a task needs retransmission
+ * @task: pointer to rpc_task
+ *
+ * Test for whether a connection breakage requires the task to retransmit
+ */
+bool
+xprt_request_need_retransmit(struct rpc_task *task)
+{
+ return xprt_request_retransmit_after_disconnect(task);
+}
+
+/**
* xprt_prepare_transmit - reserve the transport before sending a request
* @task: RPC task about to send a request
*