diff options
Diffstat (limited to 'drivers/net/bonding/bond_sysfs.c')
-rw-r--r-- | drivers/net/bonding/bond_sysfs.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index c29b836749b6..ec9b6460a38d 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -149,14 +149,6 @@ err_no_cmd: | |||
149 | return -EPERM; | 149 | return -EPERM; |
150 | } | 150 | } |
151 | 151 | ||
152 | static const void *bonding_namespace(struct class *cls, | ||
153 | const struct class_attribute *attr) | ||
154 | { | ||
155 | const struct bond_net *bn = | ||
156 | container_of(attr, struct bond_net, class_attr_bonding_masters); | ||
157 | return bn->net; | ||
158 | } | ||
159 | |||
160 | /* class attribute for bond_masters file. This ends up in /sys/class/net */ | 152 | /* class attribute for bond_masters file. This ends up in /sys/class/net */ |
161 | static const struct class_attribute class_attr_bonding_masters = { | 153 | static const struct class_attribute class_attr_bonding_masters = { |
162 | .attr = { | 154 | .attr = { |
@@ -165,7 +157,6 @@ static const struct class_attribute class_attr_bonding_masters = { | |||
165 | }, | 157 | }, |
166 | .show = bonding_show_bonds, | 158 | .show = bonding_show_bonds, |
167 | .store = bonding_store_bonds, | 159 | .store = bonding_store_bonds, |
168 | .namespace = bonding_namespace, | ||
169 | }; | 160 | }; |
170 | 161 | ||
171 | int bond_create_slave_symlinks(struct net_device *master, | 162 | int bond_create_slave_symlinks(struct net_device *master, |
@@ -1787,7 +1778,8 @@ int bond_create_sysfs(struct bond_net *bn) | |||
1787 | bn->class_attr_bonding_masters = class_attr_bonding_masters; | 1778 | bn->class_attr_bonding_masters = class_attr_bonding_masters; |
1788 | sysfs_attr_init(&bn->class_attr_bonding_masters.attr); | 1779 | sysfs_attr_init(&bn->class_attr_bonding_masters.attr); |
1789 | 1780 | ||
1790 | ret = netdev_class_create_file(&bn->class_attr_bonding_masters); | 1781 | ret = netdev_class_create_file_ns(&bn->class_attr_bonding_masters, |
1782 | bn->net); | ||
1791 | /* | 1783 | /* |
1792 | * Permit multiple loads of the module by ignoring failures to | 1784 | * Permit multiple loads of the module by ignoring failures to |
1793 | * create the bonding_masters sysfs file. Bonding devices | 1785 | * create the bonding_masters sysfs file. Bonding devices |
@@ -1817,7 +1809,7 @@ int bond_create_sysfs(struct bond_net *bn) | |||
1817 | */ | 1809 | */ |
1818 | void bond_destroy_sysfs(struct bond_net *bn) | 1810 | void bond_destroy_sysfs(struct bond_net *bn) |
1819 | { | 1811 | { |
1820 | netdev_class_remove_file(&bn->class_attr_bonding_masters); | 1812 | netdev_class_remove_file_ns(&bn->class_attr_bonding_masters, bn->net); |
1821 | } | 1813 | } |
1822 | 1814 | ||
1823 | /* | 1815 | /* |