diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2004-07-28 04:48:20 -0700 |
---|---|---|
committer | David S. Miller <davem@nuts.davemloft.net> | 2004-07-28 04:48:20 -0700 |
commit | c2c0007346358a44995443dac47b018e0a452cd2 (patch) | |
tree | 995ec419b1906d8bfe30403e1228c3701eec97e6 /net | |
parent | 27f9a00a0e6fc565f5f52570ed633b599f89802f (diff) | |
download | history-c2c0007346358a44995443dac47b018e0a452cd2.tar.gz |
[NET]: Kill rtnl_exlock stubs.
Rtnetlink has some macro's that are relics from earlier locking.
They are only used a couple of places so are easy to kill.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@redhat.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/dev.c | 2 | ||||
-rw-r--r-- | net/core/link_watch.c | 2 | ||||
-rw-r--r-- | net/core/rtnetlink.c | 13 |
3 files changed, 1 insertions, 16 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index af4654d93fb3bc..3bead55e88a634 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3041,7 +3041,6 @@ static void netdev_wait_allrefs(struct net_device *dev) while (atomic_read(&dev->refcnt) != 0) { if (time_after(jiffies, rebroadcast_time + 1 * HZ)) { rtnl_shlock(); - rtnl_exlock(); /* Rebroadcast unregister notification */ notifier_call_chain(&netdev_chain, @@ -3058,7 +3057,6 @@ static void netdev_wait_allrefs(struct net_device *dev) linkwatch_run_queue(); } - rtnl_exunlock(); rtnl_shunlock(); rebroadcast_time = jiffies; diff --git a/net/core/link_watch.c b/net/core/link_watch.c index ae661b3a31d26b..6dd61ea39b2d85 100644 --- a/net/core/link_watch.c +++ b/net/core/link_watch.c @@ -93,9 +93,7 @@ static void linkwatch_event(void *dummy) clear_bit(LW_RUNNING, &linkwatch_flags); rtnl_shlock(); - rtnl_exlock(); linkwatch_run_queue(); - rtnl_exunlock(); rtnl_shunlock(); } diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index e652d8fbaa60cb..e2c751ed332ea9 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -56,12 +56,10 @@ DECLARE_MUTEX(rtnl_sem); void rtnl_lock(void) { rtnl_shlock(); - rtnl_exlock(); } void rtnl_unlock(void) { - rtnl_exunlock(); rtnl_shunlock(); netdev_run_todo(); @@ -404,13 +402,8 @@ rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, int *errp) return -1; } - if (kind != 2) { - if (rtnl_exlock_nowait()) { - *errp = 0; - return -1; - } + if (kind != 2) exclusive = 1; - } memset(&rta, 0, sizeof(rta)); @@ -439,14 +432,10 @@ rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, int *errp) goto err_inval; err = link->doit(skb, nlh, (void *)&rta); - if (exclusive) - rtnl_exunlock(); *errp = err; return err; err_inval: - if (exclusive) - rtnl_exunlock(); *errp = -EINVAL; return -1; } |