From 100ab467460c2f855045d87c44c4e604e705e76e Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Thu, 3 Dec 2009 15:58:56 -0500 Subject: [PATCH] --- yaml --- r: 175939 b: refs/heads/master c: 206a134b4d8abf57cd34dffacf993869355b9aac h: refs/heads/master i: 175937: 0ba80ce1f73c1158e358d14a98efcede50fd0177 175935: 9942f681c6bd0fb864106550f26d44a2525434a2 v: v3 --- [refs] | 2 +- trunk/net/sunrpc/clnt.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 599e7ff0735d..d6219c654413 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dd47f96c077b4516727e497e4b6fd47a06778c0a +refs/heads/master: 206a134b4d8abf57cd34dffacf993869355b9aac diff --git a/trunk/net/sunrpc/clnt.c b/trunk/net/sunrpc/clnt.c index 38829e20500b..7bcd931e06ee 100644 --- a/trunk/net/sunrpc/clnt.c +++ b/trunk/net/sunrpc/clnt.c @@ -1180,10 +1180,22 @@ static void call_transmit_status(struct rpc_task *task) { task->tk_action = call_status; + + /* + * Common case: success. Force the compiler to put this + * test first. + */ + if (task->tk_status == 0) { + xprt_end_transmit(task); + rpc_task_force_reencode(task); + return; + } + switch (task->tk_status) { case -EAGAIN: break; default: + dprint_status(task); xprt_end_transmit(task); /* * Special cases: if we've been waiting on the