From: Mitch Williams Date: Wed, 9 Nov 2005 18:35:21 +0000 (-0800) Subject: [PATCH] bonding: get slave name from actual slave instead of param list X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0f418b2ac49e97b7b763e0473320a201eec15ed3;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] bonding: get slave name from actual slave instead of param list Take the primary slave name shown in /proc from the actual slave dev instead of from the command-line parameter, which won't be present if the bond is created via sysfs. Signed-off-by: Mitch Williams Acked-by: Jay Vosburgh Signed-off-by: John W. Linville --- diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 9d9f027a9af4..3e9b47d9f21b 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3278,8 +3278,8 @@ static void bond_info_show_master(struct seq_file *seq) if (USES_PRIMARY(bond->params.mode)) { seq_printf(seq, "Primary Slave: %s\n", - (bond->params.primary[0]) ? - bond->params.primary : "None"); + (bond->primary_slave) ? + bond->primary_slave->dev->name : "None"); seq_printf(seq, "Currently Active Slave: %s\n", (curr) ? curr->dev->name : "None");