mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
1c2d670f36
commit
6313c1e099
6 changed files with 3 additions and 22 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue