Commit 5d55fdf9 authored by Jonathan E Brassow's avatar Jonathan E Brassow Committed by Linus Torvalds

[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: default avatarJonathan E Brassow <jbrassow@redhat.com>
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
Cc: <dm-devel@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d287483d
...@@ -136,7 +136,7 @@ static int rr_add_path(struct path_selector *ps, struct path *path, ...@@ -136,7 +136,7 @@ static int rr_add_path(struct path_selector *ps, struct path *path,
path->pscontext = pi; path->pscontext = pi;
list_add(&pi->list, &s->valid_paths); list_add_tail(&pi->list, &s->valid_paths);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment