summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre
diff options
context:
space:
mode:
authorDoug Oucharek <doug.s.oucharek@intel.com>2016-09-18 16:39:00 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-19 10:08:22 +0200
commit9522bb7ac76f8290e65259a744ed5f286be39994 (patch)
tree9ff4f5db437448df24a4a9dddb777b5acc3ad1eb /drivers/staging/lustre
parent4c6722fbc187e64288796d216e4685bb3b27c3f2 (diff)
downloadlinux-9522bb7ac76f8290e65259a744ed5f286be39994.tar.bz2
staging: lustre: lnet: Ensure routing is turned on first time
In lnet_rtrpools_enable(), a mistake was made and routing was not being turned on when the rtrpools are being allocated for the first time. This patch fixes that routine so we remember to turn on routing after allocating the rtrpools. Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8501 Reviewed-on: http://review.whamcloud.com/21934 Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Amir Shehata <amir.shehata@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r--drivers/staging/lustre/lnet/lnet/router.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/lustre/lnet/lnet/router.c b/drivers/staging/lustre/lnet/lnet/router.c
index 69819c93fc0b..063ad55ec950 100644
--- a/drivers/staging/lustre/lnet/lnet/router.c
+++ b/drivers/staging/lustre/lnet/lnet/router.c
@@ -1693,7 +1693,7 @@ lnet_rtrpools_adjust(int tiny, int small, int large)
int
lnet_rtrpools_enable(void)
{
- int rc;
+ int rc = 0;
if (the_lnet.ln_routing)
return 0;
@@ -1706,9 +1706,9 @@ lnet_rtrpools_enable(void)
* if we are just configuring this for the first
* time.
*/
- return lnet_rtrpools_alloc(1);
-
- rc = lnet_rtrpools_adjust_helper(0, 0, 0);
+ rc = lnet_rtrpools_alloc(1);
+ else
+ rc = lnet_rtrpools_adjust_helper(0, 0, 0);
if (rc)
return rc;
@@ -1718,7 +1718,7 @@ lnet_rtrpools_enable(void)
the_lnet.ln_ping_info->pi_features &= ~LNET_PING_FEAT_RTE_DISABLED;
lnet_net_unlock(LNET_LOCK_EX);
- return 0;
+ return rc;
}
void