From: Jonathan E Brassow Date: Thu, 9 Nov 2006 01:44:43 +0000 (-0800) Subject: [PATCH] dm: multipath: fix rr_add_path order X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5d55fdf94998db1df9ee7f1def8806bfd0e5ff73;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [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 Signed-off-by: Alasdair G Kergon Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/dm-round-robin.c b/drivers/md/dm-round-robin.c index c5a16c550122..6f9fcd4db9b5 100644 --- a/drivers/md/dm-round-robin.c +++ b/drivers/md/dm-round-robin.c @@ -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; }