[Sheepdog] [PATCH 4/6] remove useless sd_node_list checking in is_master()

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Fri Apr 9 09:10:43 CEST 2010


- for non masters, if sys->synchronized is non zero, sys->sd_node_list
  should not be empty.

- for the master, confchg is called before deliver. confchg sets
  sys->synchronized and adds itself to sd_node_list.

Signed-off-by: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
---
 collie/group.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/collie/group.c b/collie/group.c
index 12ebb0d..48ead9e 100644
--- a/collie/group.c
+++ b/collie/group.c
@@ -303,9 +303,6 @@ static int is_master(void)
 	if (!sys->synchronized)
 		return 0;
 
-	if (list_empty(&sys->sd_node_list))
-		return 1;
-
 	node = list_first_entry(&sys->sd_node_list, struct node, list);
 	if (is_myself(&node->ent))
 		return 1;
-- 
1.7.0




More information about the sheepdog mailing list