Skip to content

Commit

Permalink
[PATCH] dm: multipath: fix rr_add_path order
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan E Brassow authored and Linus Torvalds committed Nov 9, 2006
1 parent d287483 commit 5d55fdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/dm-round-robin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5d55fdf

Please sign in to comment.