diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-15 12:40:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-15 12:40:05 -0400 |
commit | 2ed0e21b30b53d3a94e204196e523e6c8f732b56 (patch) | |
tree | de2635426477d86338a9469ce09ba0626052288f /net/core/net-sysfs.c | |
parent | 0fa213310cd8fa7a51071cdcf130e26fa56e9549 (diff) | |
parent | 9cbc1cb8cd46ce1f7645b9de249b2ce8460129bb (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1244 commits)
pkt_sched: Rename PSCHED_US2NS and PSCHED_NS2US
ipv4: Fix fib_trie rebalancing
Bluetooth: Fix issue with uninitialized nsh.type in DTL-1 driver
Bluetooth: Fix Kconfig issue with RFKILL integration
PIM-SM: namespace changes
ipv4: update ARPD help text
net: use a deferred timer in rt_check_expire
ieee802154: fix kconfig bool/tristate muckup
bonding: initialization rework
bonding: use is_zero_ether_addr
bonding: network device names are case sensative
bonding: elminate bad refcount code
bonding: fix style issues
bonding: fix destructor
bonding: remove bonding read/write semaphore
bonding: initialize before registration
bonding: bond_create always called with default parameters
x_tables: Convert printk to pr_err
netfilter: conntrack: optional reliable conntrack event delivery
list_nulls: add hlist_nulls_add_head and hlist_nulls_del
...
Diffstat (limited to 'net/core/net-sysfs.c')
-rw-r--r-- | net/core/net-sysfs.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 2da59a0ac4ac..3994680c08b9 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
@@ -78,7 +78,7 @@ static ssize_t netdev_store(struct device *dev, struct device_attribute *attr, | |||
78 | goto err; | 78 | goto err; |
79 | 79 | ||
80 | if (!rtnl_trylock()) | 80 | if (!rtnl_trylock()) |
81 | return -ERESTARTSYS; | 81 | return restart_syscall(); |
82 | 82 | ||
83 | if (dev_isalive(net)) { | 83 | if (dev_isalive(net)) { |
84 | if ((ret = (*set)(net, new)) == 0) | 84 | if ((ret = (*set)(net, new)) == 0) |
@@ -225,7 +225,8 @@ static ssize_t store_ifalias(struct device *dev, struct device_attribute *attr, | |||
225 | if (len > 0 && buf[len - 1] == '\n') | 225 | if (len > 0 && buf[len - 1] == '\n') |
226 | --count; | 226 | --count; |
227 | 227 | ||
228 | rtnl_lock(); | 228 | if (!rtnl_trylock()) |
229 | return restart_syscall(); | ||
229 | ret = dev_set_alias(netdev, buf, count); | 230 | ret = dev_set_alias(netdev, buf, count); |
230 | rtnl_unlock(); | 231 | rtnl_unlock(); |
231 | 232 | ||
@@ -238,7 +239,8 @@ static ssize_t show_ifalias(struct device *dev, | |||
238 | const struct net_device *netdev = to_net_dev(dev); | 239 | const struct net_device *netdev = to_net_dev(dev); |
239 | ssize_t ret = 0; | 240 | ssize_t ret = 0; |
240 | 241 | ||
241 | rtnl_lock(); | 242 | if (!rtnl_trylock()) |
243 | return restart_syscall(); | ||
242 | if (netdev->ifalias) | 244 | if (netdev->ifalias) |
243 | ret = sprintf(buf, "%s\n", netdev->ifalias); | 245 | ret = sprintf(buf, "%s\n", netdev->ifalias); |
244 | rtnl_unlock(); | 246 | rtnl_unlock(); |
@@ -497,7 +499,6 @@ int netdev_register_kobject(struct net_device *net) | |||
497 | dev->platform_data = net; | 499 | dev->platform_data = net; |
498 | dev->groups = groups; | 500 | dev->groups = groups; |
499 | 501 | ||
500 | BUILD_BUG_ON(BUS_ID_SIZE < IFNAMSIZ); | ||
501 | dev_set_name(dev, "%s", net->name); | 502 | dev_set_name(dev, "%s", net->name); |
502 | 503 | ||
503 | #ifdef CONFIG_SYSFS | 504 | #ifdef CONFIG_SYSFS |