Whamcloud - gitweb
LU-4007 libcfs: fix for removing lcw at lcw_dispatch_main 55/7755/3
authorAlexander.Boyko <alexander_boyko@xyratex.com>
Wed, 25 Sep 2013 09:18:26 +0000 (13:18 +0400)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 1 Nov 2013 23:06:06 +0000 (23:06 +0000)
lcw_dispatch_main() creates zombies list and moves lcw into it.
But removes entry from another list in the zombies loop.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Xyratex-bug-id: MRP-1179
Change-Id: I9daec3d9b3dbbf244a28b829cd724c8ec60c4b6c
Reviewed-on: http://review.whamcloud.com/7755
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
libcfs/libcfs/watchdog.c

index 93802ac..3a97431 100644 (file)
@@ -281,13 +281,13 @@ static int lcw_dispatch_main(void *data)
                }
                spin_unlock_bh(&lcw_pending_timers_lock);
 
-                while (!cfs_list_empty(&zombies)) {
-                        lcw = cfs_list_entry(lcw_pending_timers.next,
-                                         struct lc_watchdog, lcw_list);
-                        cfs_list_del(&lcw->lcw_list);
-                        LIBCFS_FREE(lcw, sizeof(*lcw));
-                }
-        }
+               while (!cfs_list_empty(&zombies)) {
+                       lcw = cfs_list_entry(zombies.next,
+                                            struct lc_watchdog, lcw_list);
+                       cfs_list_del_init(&lcw->lcw_list);
+                       LIBCFS_FREE(lcw, sizeof(*lcw));
+               }
+       }
 
        complete(&lcw_stop_completion);