mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-13 20:33:15 +00:00
fs/afs: Replace rcu_swap_protected() with rcu_replace_pointer()
This commit replaces the use of rcu_swap_protected() with the more intuitively appealing rcu_replace_pointer() as a step towards removing rcu_swap_protected(). Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/ Reported-by: Linus Torvalds <torvalds@linux-foundation.org> [ paulmck: From rcu_replace() to rcu_replace_pointer() per Ingo Molnar. ] Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Acked-by: David Howells <dhowells@redhat.com> Cc: <linux-afs@lists.infradead.org> Cc: <linux-kernel@vger.kernel.org>
This commit is contained in:
parent
c0eaf15cd5
commit
62860da708
@ -279,8 +279,8 @@ struct afs_vlserver_list *afs_extract_vlserver_list(struct afs_cell *cell,
|
|||||||
struct afs_addr_list *old = addrs;
|
struct afs_addr_list *old = addrs;
|
||||||
|
|
||||||
write_lock(&server->lock);
|
write_lock(&server->lock);
|
||||||
rcu_swap_protected(server->addresses, old,
|
old = rcu_replace_pointer(server->addresses, old,
|
||||||
lockdep_is_held(&server->lock));
|
lockdep_is_held(&server->lock));
|
||||||
write_unlock(&server->lock);
|
write_unlock(&server->lock);
|
||||||
afs_put_addrlist(old);
|
afs_put_addrlist(old);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user