From 85899bef9dbdbd5b9c2361974ec42f3cc5c3e4a1 Mon Sep 17 00:00:00 2001 From: "Alexander.Boyko" Date: Wed, 25 Sep 2013 13:18:26 +0400 Subject: [PATCH] LU-4007 libcfs: fix for removing lcw at lcw_dispatch_main 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 Xyratex-bug-id: MRP-1179 Change-Id: I9daec3d9b3dbbf244a28b829cd724c8ec60c4b6c Reviewed-on: http://review.whamcloud.com/7755 Reviewed-by: Dmitry Eremin Tested-by: Jenkins Reviewed-by: Doug Oucharek Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Liang Zhen Reviewed-by: Isaac Huang --- libcfs/libcfs/watchdog.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libcfs/libcfs/watchdog.c b/libcfs/libcfs/watchdog.c index 93802ac..3a97431 100644 --- a/libcfs/libcfs/watchdog.c +++ b/libcfs/libcfs/watchdog.c @@ -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); -- 1.8.3.1