Skip to content

Commit

Permalink
SUNRPC: remove BUG_ONs checking RPC_IS_QUEUED
Browse files Browse the repository at this point in the history
Replace two BUG_ON() calls with WARN_ON_ONCE() and early returns.

Signed-off-by: Weston Andros Adamson <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
  • Loading branch information
westonandrosadamson authored and Trond Myklebust committed Nov 4, 2012
1 parent f50ad42 commit 2bd4eef
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions net/sunrpc/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 *);
Expand Down

0 comments on commit 2bd4eef

Please sign in to comment.