* [PATCH net-next-2.6] bonding: remove redundant checks from bonding_store_slaves V2
@ 2010-05-18 15:44 Jiri Pirko
2010-06-02 10:40 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Pirko @ 2010-05-18 15:44 UTC (permalink / raw)
To: netdev; +Cc: davem, fubar, bonding-devel
(it's actually the same as v1)
Remove checks that duplicates similar checks in bond_enslave.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
drivers/net/bonding/bond_sysfs.c | 20 +-------------------
1 files changed, 1 insertions(+), 19 deletions(-)
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 29a7a8a..7911438 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -243,7 +243,7 @@ static ssize_t bonding_store_slaves(struct device *d,
if (command[0] == '+') {
- /* Got a slave name in ifname. Is it already in the list? */
+ /* Got a slave name in ifname. */
dev = __dev_get_by_name(dev_net(bond->dev), ifname);
if (!dev) {
@@ -253,24 +253,6 @@ static ssize_t bonding_store_slaves(struct device *d,
goto out;
}
- if (dev->flags & IFF_UP) {
- pr_err("%s: Error: Unable to enslave %s because it is already up.\n",
- bond->dev->name, dev->name);
- ret = -EPERM;
- goto out;
- }
-
- read_lock(&bond->lock);
- bond_for_each_slave(bond, slave, i)
- if (slave->dev == dev) {
- pr_err("%s: Interface %s is already enslaved!\n",
- bond->dev->name, ifname);
- ret = -EPERM;
- read_unlock(&bond->lock);
- goto out;
- }
- read_unlock(&bond->lock);
-
pr_info("%s: Adding slave %s.\n", bond->dev->name, ifname);
/* If this is the first slave, then we need to set
--
1.6.6.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next-2.6] bonding: remove redundant checks from bonding_store_slaves V2
2010-05-18 15:44 [PATCH net-next-2.6] bonding: remove redundant checks from bonding_store_slaves V2 Jiri Pirko
@ 2010-06-02 10:40 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-06-02 10:40 UTC (permalink / raw)
To: jpirko; +Cc: netdev, fubar, bonding-devel
From: Jiri Pirko <jpirko@redhat.com>
Date: Tue, 18 May 2010 17:44:53 +0200
> (it's actually the same as v1)
>
> Remove checks that duplicates similar checks in bond_enslave.
>
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-02 10:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-18 15:44 [PATCH net-next-2.6] bonding: remove redundant checks from bonding_store_slaves V2 Jiri Pirko
2010-06-02 10:40 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.