Blob Blame History Raw
From f689c72d7dbc7bab1cc20440ceccf2c240530d5b Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb@suse.com>
Date: Fri, 2 Mar 2018 10:31:25 +1100
Subject: [PATCH] staging: lustre: statahead: remove incorrect test on agl_list_empty()
Git-commit: f689c72d7dbc7bab1cc20440ceccf2c240530d5b
Patch-mainline: v4.17-rc1
References: bsc#1051510

Including agl_list_empty() in the wait_event_idle() condition
is pointless as the body of the loop doesn't do anything
about the agl list.
So if the list wasn't empty, the while loop would spin
indefinitely.

The test was removed in the lustre-release commit
672ab0e00d61 ("LU-3270 statahead: small fixes and cleanup"),
but not in the Linux commit 5231f7651c55 ("staging: lustre:
Statahead: small fixes and cleanup").

Fixes: 5231f7651c55 ("staging: lustre: statahead: small fixes and cleanup")
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 drivers/staging/lustre/lustre/llite/statahead.c |    1 -
 1 file changed, 1 deletion(-)

--- a/drivers/staging/lustre/lustre/llite/statahead.c
+++ b/drivers/staging/lustre/lustre/llite/statahead.c
@@ -1128,7 +1128,6 @@ static int ll_statahead_thread(void *arg
 	while (thread_is_running(sa_thread)) {
 		l_wait_event(sa_thread->t_ctl_waitq,
 			     sa_has_callback(sai) ||
-			     !agl_list_empty(sai) ||
 			     !thread_is_running(sa_thread),
 			     &lwi);