mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-06 06:37:59 +00:00
IB/cm: Remove now useless rcu_lock in dst_fetch_ha
This lock used to be protecting a call to dst_get_neighbour_noref,
however the below commit changed it to dst_neigh_lookup which no longer
requires rcu.
Access to nud_state, neigh_event_send or rdma_copy_addr does not require
RCU, so delete the lock.
Fixes: 02b619555a
("infiniband: Convert dst_fetch_ha() over to dst_neigh_lookup().")
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
This commit is contained in:
parent
1517799965
commit
92ebb6a0a1
1 changed files with 5 additions and 7 deletions
|
@ -315,19 +315,17 @@ static int dst_fetch_ha(const struct dst_entry *dst,
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
n = dst_neigh_lookup(dst, daddr);
|
n = dst_neigh_lookup(dst, daddr);
|
||||||
|
if (!n)
|
||||||
|
return -ENODATA;
|
||||||
|
|
||||||
rcu_read_lock();
|
if (!(n->nud_state & NUD_VALID)) {
|
||||||
if (!n || !(n->nud_state & NUD_VALID)) {
|
neigh_event_send(n, NULL);
|
||||||
if (n)
|
|
||||||
neigh_event_send(n, NULL);
|
|
||||||
ret = -ENODATA;
|
ret = -ENODATA;
|
||||||
} else {
|
} else {
|
||||||
rdma_copy_addr(dev_addr, dst->dev, n->ha);
|
rdma_copy_addr(dev_addr, dst->dev, n->ha);
|
||||||
}
|
}
|
||||||
rcu_read_unlock();
|
|
||||||
|
|
||||||
if (n)
|
neigh_release(n);
|
||||||
neigh_release(n);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue