Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150093
b: refs/heads/master
c: aee64fa
h: refs/heads/master
i:
  150091: 83d9151
v: v3
  • Loading branch information
Jiri Pirko authored and David S. Miller committed May 5, 2009
1 parent 82ebf0f commit 89a8ab1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 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: f001fde5eadd915f4858d22ed70d7040f48767cf
refs/heads/master: aee64faf236815e0f337408892c01b373cd340f3
30 changes: 20 additions & 10 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3459,19 +3459,37 @@ static void bond_destroy_proc_dir(void)
bond_proc_dir = NULL;
}
}

#else /* !CONFIG_PROC_FS */

static int bond_create_proc_entry(struct bonding *bond)
{
}

static void bond_remove_proc_entry(struct bonding *bond)
{
}

static void bond_create_proc_dir(void)
{
}

static void bond_destroy_proc_dir(void)
{
}

#endif /* CONFIG_PROC_FS */


/*-------------------------- netdev event handling --------------------------*/

/*
* Change device name
*/
static int bond_event_changename(struct bonding *bond)
{
#ifdef CONFIG_PROC_FS
bond_remove_proc_entry(bond);
bond_create_proc_entry(bond);
#endif
down_write(&(bonding_rwsem));
bond_destroy_sysfs_entry(bond);
bond_create_sysfs_entry(bond);
Expand Down Expand Up @@ -4637,9 +4655,7 @@ static int bond_init(struct net_device *bond_dev, struct bond_params *params)
NETIF_F_HW_VLAN_RX |
NETIF_F_HW_VLAN_FILTER);

#ifdef CONFIG_PROC_FS
bond_create_proc_entry(bond);
#endif
list_add_tail(&bond->bond_list, &bond_dev_list);

return 0;
Expand Down Expand Up @@ -4677,9 +4693,7 @@ static void bond_deinit(struct net_device *bond_dev)

bond_work_cancel_all(bond);

#ifdef CONFIG_PROC_FS
bond_remove_proc_entry(bond);
#endif
}

/* Unregister and free all bond devices.
Expand All @@ -4698,9 +4712,7 @@ static void bond_free_all(void)
bond_destroy(bond);
}

#ifdef CONFIG_PROC_FS
bond_destroy_proc_dir();
#endif
}

/*------------------------- Module initialization ---------------------------*/
Expand Down Expand Up @@ -5196,9 +5208,7 @@ static int __init bonding_init(void)
goto out;
}

#ifdef CONFIG_PROC_FS
bond_create_proc_dir();
#endif

init_rwsem(&bonding_rwsem);

Expand Down

0 comments on commit 89a8ab1

Please sign in to comment.