From: phil Date: Fri, 19 Nov 2004 07:55:12 +0000 (+0000) Subject: Fix my brown paper bag spinlock bug X-Git-Tag: v1_8_0_110~486^5~95 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=72f9673112521728dc1b1f3180166def0390a083;p=fs%2Flustre-release.git Fix my brown paper bag spinlock bug --- diff --git a/lustre/portals/libcfs/watchdog.c b/lustre/portals/libcfs/watchdog.c index 91a077c..844845a 100644 --- a/lustre/portals/libcfs/watchdog.c +++ b/lustre/portals/libcfs/watchdog.c @@ -138,12 +138,15 @@ static void lcw_cb(unsigned long data) static int is_watchdog_fired(void) { unsigned long flags; + int rc; if (test_bit(LCW_FLAG_STOP, &lcw_flags)) return 1; spin_lock_irqsave(&lcw_pending_timers_lock, flags); - return !list_empty(&lcw_pending_timers); + rc = !list_empty(&lcw_pending_timers); + spin_unlock_irqrestore(&lcw_pending_timers_lock, flags); + return rc; } static int lcw_dispatch_main(void *data)