]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] dm: multipath: fix rr_add_path order
authorJonathan E Brassow <jbrassow@redhat.com>
Thu, 9 Nov 2006 01:44:43 +0000 (17:44 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 9 Nov 2006 02:29:23 +0000 (18:29 -0800)
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>
drivers/md/dm-round-robin.c

index c5a16c5501227f1097a72ddcb85f6ef37be4bec2..6f9fcd4db9b553fde5e1af06ab8d728e9c25cb7f 100644 (file)
@@ -136,7 +136,7 @@ static int rr_add_path(struct path_selector *ps, struct path *path,
 
        path->pscontext = pi;
 
-       list_add(&pi->list, &s->valid_paths);
+       list_add_tail(&pi->list, &s->valid_paths);
 
        return 0;
 }