From: Weston Andros Adamson Date: Tue, 23 Oct 2012 14:43:47 +0000 (-0400) Subject: SUNRPC: remove BUG_ONs checking RPC_IS_QUEUED X-Git-Tag: v3.8-rc1~72^2~66 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2bd4eef87bc169f1baf5d1518ba939897cc32471;p=platform%2Fkernel%2Flinux-stable.git SUNRPC: remove BUG_ONs checking RPC_IS_QUEUED Replace two BUG_ON() calls with WARN_ON_ONCE() and early returns. Signed-off-by: Weston Andros Adamson Signed-off-by: Trond Myklebust --- diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index e6db496..6904917 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c @@ -133,7 +133,9 @@ static void __rpc_add_wait_queue(struct rpc_wait_queue *queue, struct rpc_task *task, unsigned char queue_priority) { - BUG_ON (RPC_IS_QUEUED(task)); + WARN_ON_ONCE(RPC_IS_QUEUED(task)); + if (RPC_IS_QUEUED(task)) + return; if (RPC_IS_PRIORITY(queue)) __rpc_add_wait_queue_priority(queue, task, queue_priority); @@ -707,7 +709,9 @@ static void __rpc_execute(struct rpc_task *task) dprintk("RPC: %5u __rpc_execute flags=0x%x\n", task->tk_pid, task->tk_flags); - BUG_ON(RPC_IS_QUEUED(task)); + WARN_ON_ONCE(RPC_IS_QUEUED(task)); + if (RPC_IS_QUEUED(task)) + return; for (;;) { void (*do_action)(struct rpc_task *);