From 9cea39d8931816ac07d11af8198100e82a26143c Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Mon, 31 Jan 2022 15:06:00 -0700 Subject: [PATCH] LU-14724 tbf: fix backport of patch Backport of LU-14724 patch https://review.whamcloud.com/43925 was based on an old version of the patch on master that had later changes applied. Use newer version of change. Test-Parameters: trivial testlist=sanityn env=ONLY=77o,ONLY_REPEAT=100 Fixes: 345f0d8e56c4 ("LU-14724 nrs: TBF rule list broken when change rule rank") Signed-off-by: Andreas Dilger Change-Id: Ieb6b2fc4d48350dba509d1a4ee7a97ca7fba886a Reviewed-on: https://review.whamcloud.com/46401 Tested-by: jenkins Tested-by: Maloo --- lustre/ptlrpc/nrs_tbf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lustre/ptlrpc/nrs_tbf.c b/lustre/ptlrpc/nrs_tbf.c index 09d0321..fc0cd19 100644 --- a/lustre/ptlrpc/nrs_tbf.c +++ b/lustre/ptlrpc/nrs_tbf.c @@ -393,8 +393,7 @@ nrs_tbf_rule_change_rank(struct ptlrpc_nrs_policy *policy, GOTO(out_put, rc = -ENOENT); /* rules may be adjacent in same list, so list_move() is not safe */ - list_del(&rule->tr_linkage); - list_add(&rule->tr_linkage, next_rule->tr_linkage.prev); + list_move_tail(&rule->tr_linkage, &next_rule->tr_linkage); nrs_tbf_rule_put(next_rule); out_put: nrs_tbf_rule_put(rule); -- 1.8.3.1