summaryrefslogtreecommitdiff
path: root/net/decnet/dn_dev.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-04-17 00:00:53 (GMT)
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 05:29:05 (GMT)
commit6313c1e0992feaee56bc09b85042b3186041fa3c (patch)
treef75cda674d8f2b62bcdb09e59f8bc7010003a91f /net/decnet/dn_dev.c
parent1c2d670f3660e9103fdcdca702f6dbf8ea7d6afb (diff)
downloadlinux-fsl-qoriq-6313c1e0992feaee56bc09b85042b3186041fa3c.tar.xz
[RTNETLINK]: Remove unnecessary locking in dump callbacks
Since we're now holding the rtnl during the entire dump operation, we can remove additional locking for rtnl protected data. This patch does that for all simple cases (dev_base_lock for dev_base walking, RCU protection for FIB rule dumping). Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet/dn_dev.c')
-rw-r--r--net/decnet/dn_dev.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index 61be2ca..5c2a995 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -799,7 +799,6 @@ static int dn_nl_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb)
skip_ndevs = cb->args[0];
skip_naddr = cb->args[1];
- read_lock(&dev_base_lock);
for (dev = dev_base, idx = 0; dev; dev = dev->next, idx++) {
if (idx < skip_ndevs)
continue;
@@ -824,8 +823,6 @@ static int dn_nl_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb)
}
}
done:
- read_unlock(&dev_base_lock);
-
cb->args[0] = idx;
cb->args[1] = dn_idx;