Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150954
b: refs/heads/master
c: 6d7ab43
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Jun 14, 2009
1 parent 62f66b4 commit abdb84a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3d632c3f28e69f0d6d44aa09c4df708d63a91a7c
refs/heads/master: 6d7ab43ccce5fddeca945ba6b06ba32cda4e3355
21 changes: 0 additions & 21 deletions trunk/drivers/net/bonding/bond_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@
#define to_dev(obj) container_of(obj, struct device, kobj)
#define to_bond(cd) ((struct bonding *)(netdev_priv(to_net_dev(cd))))

/*---------------------------- Declarations -------------------------------*/

static int expected_refcount = -1;

/*------------------------------ Functions --------------------------------*/

/*
* "show" function for the bond_masters attribute.
* The class parameter is ignored.
Expand Down Expand Up @@ -112,18 +106,6 @@ static ssize_t bonding_store_bonds(struct class *cls,

list_for_each_entry(bond, &bond_dev_list, bond_list)
if (strnicmp(bond->dev->name, ifname, IFNAMSIZ) == 0) {
/* check the ref count on the bond's kobject.
* If it's > expected, then there's a file open,
* and we have to fail.
*/
if (atomic_read(&bond->dev->dev.kobj.kref.refcount)
> expected_refcount){
pr_info(DRV_NAME
": Unable remove bond %s due to open references.\n",
ifname);
res = -EPERM;
goto out_unlock;
}
pr_info(DRV_NAME
": %s is being deleted...\n",
bond->dev->name);
Expand Down Expand Up @@ -1579,9 +1561,6 @@ int bond_create_sysfs_entry(struct bonding *bond)
if (err)
printk(KERN_EMERG "eek! didn't create group!\n");

if (expected_refcount < 1)
expected_refcount = atomic_read(&bond->dev->dev.kobj.kref.refcount);

return err;
}
/*
Expand Down

0 comments on commit abdb84a

Please sign in to comment.