Commit 47dd8796 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

SUNRPC: Add cond_resched() at the appropriate point in __rpc_execute()



Allow tasks that need to pre-empt rpciod/xprtiod to do so when it is
safe.

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent ea7a1019
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -903,8 +903,10 @@ static void __rpc_execute(struct rpc_task *task)
		/*
		 * Lockless check for whether task is sleeping or not.
		 */
		if (!RPC_IS_QUEUED(task))
		if (!RPC_IS_QUEUED(task)) {
			cond_resched();
			continue;
		}

		/*
		 * Signalled tasks should exit rather than sleep.