From 208c1fc60affa9497471a627e128dc58a15146c6 Mon Sep 17 00:00:00 2001 From: vitaly <vitaly> Date: Thu, 29 May 2008 22:38:27 +0000 Subject: [PATCH] Branch b1_6 b=15904 i=shadow i=wangdi clean log_commit_master properly at cleanup in llog_commit_thread() --- lustre/ptlrpc/recov_thread.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lustre/ptlrpc/recov_thread.c b/lustre/ptlrpc/recov_thread.c index 9ec7074114..7355d1ea7e 100644 --- a/lustre/ptlrpc/recov_thread.c +++ b/lustre/ptlrpc/recov_thread.c @@ -363,9 +363,8 @@ static int log_commit_thread(void *arg) CERROR("error preparing commit: rc %d\n", rc); spin_lock(&lcm->lcm_llcd_lock); - list_splice(&lcd->lcd_llcd_list, - &lcm->lcm_llcd_resend); - CFS_INIT_LIST_HEAD(&lcd->lcd_llcd_list); + list_splice_init(&lcd->lcd_llcd_list, + &lcm->lcm_llcd_resend); spin_unlock(&lcm->lcm_llcd_lock); break; } @@ -416,9 +415,9 @@ static int log_commit_thread(void *arg) /* If we are force exiting, just drop all of the cookies. */ if (lcm->lcm_flags & LLOG_LCM_FL_EXIT_FORCE) { spin_lock(&lcm->lcm_llcd_lock); - list_splice(&lcm->lcm_llcd_pending, &lcd->lcd_llcd_list); - list_splice(&lcm->lcm_llcd_resend, &lcd->lcd_llcd_list); - list_splice(&lcm->lcm_llcd_free, &lcd->lcd_llcd_list); + list_splice_init(&lcm->lcm_llcd_pending, &lcd->lcd_llcd_list); + list_splice_init(&lcm->lcm_llcd_resend, &lcd->lcd_llcd_list); + list_splice_init(&lcm->lcm_llcd_free, &lcd->lcd_llcd_list); spin_unlock(&lcm->lcm_llcd_lock); list_for_each_entry_safe(llcd, n, &lcd->lcd_llcd_list,llcd_list) -- GitLab