[sheepdog] [PATCH 1/5 v2] sheep: remove dead code in get_cluster_status

Christoph Hellwig hch at infradead.org
Tue May 29 11:48:47 CEST 2012


Signed-off-by: Christoph Hellwig <hch at lst.de>

Index: sheepdog/sheep/group.c
===================================================================
--- sheepdog.orig/sheep/group.c	2012-05-29 11:37:11.076516638 +0200
+++ sheepdog/sheep/group.c	2012-05-29 11:38:21.012518432 +0200
@@ -412,7 +412,7 @@ static int get_cluster_status(struct sd_
 			      int nr_entries, uint64_t ctime, uint32_t epoch,
 			      uint32_t *status, uint8_t *inc_epoch)
 {
-	int i, j, ret = SD_RES_SUCCESS;
+	int ret = SD_RES_SUCCESS;
 	int nr, nr_local_entries, nr_leave_entries;
 	struct sd_node local_entries[SD_MAX_NODES];
 	char str[256];
@@ -454,18 +454,6 @@ static int get_cluster_status(struct sd_
 			break;
 		}
 
-		for (i = 0; i < nr_local_entries; i++) {
-			if (node_eq(local_entries + i, from))
-				goto next;
-			for (j = 0; j < sys->nr_nodes; j++) {
-				if (node_eq(local_entries + i, sys->nodes + j))
-					goto next;
-			}
-			break;
-		next:
-			;
-		}
-
 		*status = SD_STATUS_OK;
 		break;
 	case SD_STATUS_SHUTDOWN:



More information about the sheepdog mailing list