Whamcloud - gitweb
LU-1346 libcfs: cleanup macros in portals_compat25.h
[fs/lustre-release.git] / libcfs / libcfs / watchdog.c
index 0981a2c..2c6d67e 100644 (file)
@@ -104,11 +104,7 @@ static void
 lcw_dump(struct lc_watchdog *lcw)
 {
         ENTRY;
-#if defined(HAVE_TASKLIST_LOCK)
-       read_lock(&tasklist_lock);
-#else
         rcu_read_lock();
-#endif
        if (lcw->lcw_task == NULL) {
                 LCONSOLE_WARN("Process " LPPID " was not found in the task "
                               "list; watchdog callback may be incomplete\n",
@@ -117,11 +113,7 @@ lcw_dump(struct lc_watchdog *lcw)
                 libcfs_debug_dumpstack(lcw->lcw_task);
         }
 
-#if defined(HAVE_TASKLIST_LOCK)
-       read_unlock(&tasklist_lock);
-#else
         rcu_read_unlock();
-#endif
         EXIT;
 }
 
@@ -223,8 +215,8 @@ static int lcw_dispatch_main(void *data)
         while (1) {
                 int dumplog = 1;
 
-                cfs_wait_event_interruptible(lcw_event_waitq,
-                                             is_watchdog_fired(), rc);
+               rc = wait_event_interruptible(lcw_event_waitq,
+                                             is_watchdog_fired());
                 CDEBUG(D_INFO, "Watchdog got woken up...\n");
                if (test_bit(LCW_FLAG_STOP, &lcw_flags)) {
                        CDEBUG(D_INFO, "LCW_FLAG_STOP set, shutting down...\n");