SUNRPC: Don't bother changing the sigmask for asynchronous RPC calls
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 15 Jan 2008 19:17:11 +0000 (14:17 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 30 Jan 2008 07:06:10 +0000 (02:06 -0500)
The caller will never sleep in rpc_execute, so don't bother setting the
sigmask.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/clnt.c

index e775ca793249a406ff3a7b2ca7c9642fd1fdd6cd..924916ceaa435b531b043b190cd006268492d28b 100644 (file)
@@ -579,9 +579,12 @@ struct rpc_task *rpc_run_task(const struct rpc_task_setup *task_setup_data)
        }
        atomic_inc(&task->tk_count);
        /* Mask signals on synchronous RPC calls and RPCSEC_GSS upcalls */
-       rpc_task_sigmask(task, &oldset);
-       rpc_execute(task);
-       rpc_restore_sigmask(&oldset);
+       if (!RPC_IS_ASYNC(task)) {
+               rpc_task_sigmask(task, &oldset);
+               rpc_execute(task);
+               rpc_restore_sigmask(&oldset);
+       } else
+               rpc_execute(task);
        ret = task;
 out:
        return ret;