Skip to contentSkip to conversation

dm: multipath: fix rr_add_path order

PATCH In review Alasdair G Kergon 1 participant 1 message Nov 7, 2006 Device mapper

lore
Share & tools
lore

Alasdair G Kergon

author maintainer
#0 lore raw

PATCH 3/5 dm: multipath: fix rr_add_path order

From: Jonathan E Brassow <[email protected]>

When adding paths to the round-robin path selector, their order gets inverted, which is not desirable.

Fix by replacing list_add() with list_add_tail().

drivers/md/dm-round-robin.c +1 -1
Index: linux-2.6.19-rc4/drivers/md/dm-round-robin.c
===================================================================
@@ -136,7 +136,7 @@ static int rr_add_path(struct path_selec
 
 	path->pscontext = pi;
 
-	list_add(&pi->list, &s->valid_paths);
+	list_add_tail(&pi->list, &s->valid_paths);
 
 	return 0;
 }