This is a regression introduced by the b2_15 port of
Lustre-change: https://review.whamcloud.com/50159
Lustre-commit:
fc7a0d6013b46ebc17cdfdccc04a5d1d92c6af24
This port assigned the return value to the wrong variable. As a
result, LNetPrimaryNID() will always return the same value that
was passed in as an argument. Fix the issue by assigning the
return value to the correct variable.
Test-Parameters: trivial
Fixes:
6cfc8e55a2 ("LU-14668 lnet: add 'lock_prim_nid" lnet module parameter")
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I10e334d38e8c257239ae3fa82d0aea4f87d8ba69
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54537
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
/* DD disabled, nothing to do */
if (lnet_peer_discovery_disabled) {
- nid = lnet_nid_to_nid4(&lp->lp_primary_nid);
+ primary_nid = lnet_nid_to_nid4(&lp->lp_primary_nid);
spin_unlock(&lp->lp_lock);
goto out_decref;
}
/* Peer already up to date, nothing to do */
if (lnet_peer_is_uptodate_locked(lp)) {
- nid = lnet_nid_to_nid4(&lp->lp_primary_nid);
+ primary_nid = lnet_nid_to_nid4(&lp->lp_primary_nid);
spin_unlock(&lp->lp_lock);
goto out_decref;
}
if (!lock_prim_nid && !lnet_is_discovery_disabled(lp))
goto again;
- nid = lnet_nid_to_nid4(&lp->lp_primary_nid);
+ primary_nid = lnet_nid_to_nid4(&lp->lp_primary_nid);
out_decref:
lnet_peer_ni_decref_locked(lpni);
out_unlock: