sunrpc: Fix rpc_task_begin trace point
authorChuck Lever <chuck.lever@oracle.com>
Fri, 3 Nov 2017 17:46:06 +0000 (13:46 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Dec 2017 08:53:09 +0000 (09:53 +0100)
[ Upstream commit b2bfe5915d5fe7577221031a39ac722a0a2a1199 ]

The rpc_task_begin trace point always display a task ID of zero.
Move the trace point call site so that it picks up the new task ID.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sunrpc/sched.c

index 0cc83839c13c3621a70a4b9e8ded773217a2edf3..f9db5fe52d3674253b3b7d0d1ee2f4c57775588a 100644 (file)
@@ -274,10 +274,9 @@ static inline void rpc_task_set_debuginfo(struct rpc_task *task)
 
 static void rpc_set_active(struct rpc_task *task)
 {
-       trace_rpc_task_begin(task->tk_client, task, NULL);
-
        rpc_task_set_debuginfo(task);
        set_bit(RPC_TASK_ACTIVE, &task->tk_runstate);
+       trace_rpc_task_begin(task->tk_client, task, NULL);
 }
 
 /*