From c8ee1a84d897e26a1d176dd2cd5924a367e66531 Mon Sep 17 00:00:00 2001 From: shaver Date: Sat, 21 Dec 2002 00:07:21 +0000 Subject: [PATCH] b=514: use IRQ-safe spin_lock calls for imp_lock, because it's handled from the interrupt context leading to __ptlrpc_free_req. Use cmp instead of diff for quieter comparison of old and new build_version. Replace non-portable spin_lock_irq with spin_lock_irqsave and co. (C.f. http://www.geocrawler.com/mail/thread.php3?subject=spin_lock_irq&list=9221 ) --- lustre/llite/recover.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lustre/llite/recover.c b/lustre/llite/recover.c index 3310c34..4c7ad42 100644 --- a/lustre/llite/recover.c +++ b/lustre/llite/recover.c @@ -35,9 +35,10 @@ int ll_recover(struct recovd_data *rd, int phase) list_entry(tmp, struct obd_import, imp_chain); if (phase == PTLRPC_RECOVD_PHASE_PREPARE) { - spin_lock(&imp->imp_lock); + unsigned long flags; + spin_lock_irqsave(&imp->imp_lock, flags); imp->imp_level = LUSTRE_CONN_RECOVD; - spin_unlock(&imp->imp_lock); + spin_unlock_irqrestore(&imp->imp_lock, flags); } imp->imp_recover(imp, phase); } -- 1.8.3.1