aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@fys.uio.no>2005-01-04 21:35:39 +0100
committerTrond Myklebust <trond.myklebust@fys.uio.no>2005-01-04 21:35:39 +0100
commita1df761e76639537e2961fc3475b50772ed1ab23 (patch)
treea082ce300a46d0ac9e5dddf5ac256c81972a7b1e /net
parent176082fb633e50450a4f9c3bcb3efdef6d4b7a00 (diff)
downloadhistory-a1df761e76639537e2961fc3475b50772ed1ab23.tar.gz
RPC: More aggressive RPC debugging code.
People are worrying about spinlock deadlocks in the debugging code, without actually worrying about the bugs that triggered the debugging code in the first place. Convert to BUG_ON() in order to ensure that bugs are reported. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/sched.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index 6ee9580c93d882..b553bf661f4d66 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -25,6 +25,7 @@
#ifdef RPC_DEBUG
#define RPCDBG_FACILITY RPCDBG_SCHED
+#define RPC_TASK_MAGIC_ID 0xf00baa
static int rpc_task_id;
#endif
@@ -348,12 +349,7 @@ static void __rpc_do_wake_up_task(struct rpc_task *task)
dprintk("RPC: %4d __rpc_wake_up_task (now %ld)\n", task->tk_pid, jiffies);
#ifdef RPC_DEBUG
- if (task->tk_magic != 0xf00baa) {
- printk(KERN_ERR "RPC: attempt to wake up non-existing task!\n");
- rpc_debug = ~0;
- rpc_show_tasks();
- return;
- }
+ BUG_ON(task->tk_magic != RPC_TASK_MAGIC_ID);
#endif
/* Has the task been executed yet? If not, we cannot wake it up! */
if (!RPC_IS_ACTIVATED(task)) {
@@ -771,7 +767,7 @@ void rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt, rpc_action call
}
#ifdef RPC_DEBUG
- task->tk_magic = 0xf00baa;
+ task->tk_magic = RPC_TASK_MAGIC_ID;
task->tk_pid = rpc_task_id++;
#endif
/* Add to global list of all tasks */
@@ -836,12 +832,7 @@ void rpc_release_task(struct rpc_task *task)
dprintk("RPC: %4d release task\n", task->tk_pid);
#ifdef RPC_DEBUG
- if (task->tk_magic != 0xf00baa) {
- printk(KERN_ERR "RPC: attempt to release a non-existing task!\n");
- rpc_debug = ~0;
- rpc_show_tasks();
- return;
- }
+ BUG_ON(task->tk_magic != RPC_TASK_MAGIC_ID);
#endif
/* Remove from global task list */