Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150316
b: refs/heads/master
c: 336ca57
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman authored and David S. Miller committed May 19, 2009
1 parent 7dbc2fe commit 30d2bf0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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: 690cc3ffe33ac4a2857583c22d4c6244ae11684d
refs/heads/master: 336ca57c3b4e2b58ea3273e6d978ab3dfa387b4c
8 changes: 5 additions & 3 deletions trunk/net/core/net-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static ssize_t netdev_store(struct device *dev, struct device_attribute *attr,
goto err;

if (!rtnl_trylock())
return -ERESTARTSYS;
return restart_syscall();

if (dev_isalive(net)) {
if ((ret = (*set)(net, new)) == 0)
Expand Down Expand Up @@ -225,7 +225,8 @@ static ssize_t store_ifalias(struct device *dev, struct device_attribute *attr,
if (len > 0 && buf[len - 1] == '\n')
--count;

rtnl_lock();
if (!rtnl_trylock())
return restart_syscall();
ret = dev_set_alias(netdev, buf, count);
rtnl_unlock();

Expand All @@ -238,7 +239,8 @@ static ssize_t show_ifalias(struct device *dev,
const struct net_device *netdev = to_net_dev(dev);
ssize_t ret = 0;

rtnl_lock();
if (!rtnl_trylock())
return restart_syscall();
if (netdev->ifalias)
ret = sprintf(buf, "%s\n", netdev->ifalias);
rtnl_unlock();
Expand Down

0 comments on commit 30d2bf0

Please sign in to comment.