diff mbox

[net-next,5/6] bond_sysfs: use ream_num_tx_queues rather than params.tx_queue

Message ID 1342787331-1866-6-git-send-email-jiri@resnulli.us
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Jiri Pirko July 20, 2012, 12:28 p.m. UTC
Since now number of tx queues can be specified during bond instance
creation and therefore it may differ from params.tx_queues, use rather
real_num_tx_queues for boundary check.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 drivers/net/bonding/bond_sysfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ben Hutchings July 20, 2012, 3:03 p.m. UTC | #1
Typo in the subject line. :-)

Ben.
David Miller July 20, 2012, 6:04 p.m. UTC | #2
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Fri, 20 Jul 2012 16:03:00 +0100

> Typo in the subject line. :-)

I'll fix this up when I apply it :-)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jiri Pirko July 20, 2012, 6:09 p.m. UTC | #3
Fri, Jul 20, 2012 at 08:04:53PM CEST, davem@davemloft.net wrote:
>From: Ben Hutchings <bhutchings@solarflare.com>
>Date: Fri, 20 Jul 2012 16:03:00 +0100
>
>> Typo in the subject line. :-)

Doh!

>
>I'll fix this up when I apply it :-)

Thanks Dave :) I will use clipboard next time...


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 485bedb..dc15d24 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -1495,7 +1495,7 @@  static ssize_t bonding_store_queue_id(struct device *d,
 	/* Check buffer length, valid ifname and queue id */
 	if (strlen(buffer) > IFNAMSIZ ||
 	    !dev_valid_name(buffer) ||
-	    qid > bond->params.tx_queues)
+	    qid > bond->dev->real_num_tx_queues)
 		goto err_no_cmd;
 
 	/* Get the pointer to that interface if it exists */