[PATCH] dm: multipath: fix rr_add_path order
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().
Signed-off-by: Jonathan E Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: <dm-devel@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
diff --git a/drivers/md/dm-round-robin.c b/drivers/md/dm-round-robin.c
index c5a16c5..6f9fcd4 100644
--- a/drivers/md/dm-round-robin.c
+++ b/drivers/md/dm-round-robin.c
@@ -136,7 +136,7 @@
path->pscontext = pi;
- list_add(&pi->list, &s->valid_paths);
+ list_add_tail(&pi->list, &s->valid_paths);
return 0;
}