Skip to content

Commit 62860da

Browse files
committed
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 <[email protected]> [ paulmck: From rcu_replace() to rcu_replace_pointer() per Ingo Molnar. ] Signed-off-by: Paul E. McKenney <[email protected]> Acked-by: David Howells <[email protected]> Cc: <[email protected]> Cc: <[email protected]>
1 parent c0eaf15 commit 62860da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/afs/vl_list.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ struct afs_vlserver_list *afs_extract_vlserver_list(struct afs_cell *cell,
279279
struct afs_addr_list *old = addrs;
280280

281281
write_lock(&server->lock);
282-
rcu_swap_protected(server->addresses, old,
283-
lockdep_is_held(&server->lock));
282+
old = rcu_replace_pointer(server->addresses, old,
283+
lockdep_is_held(&server->lock));
284284
write_unlock(&server->lock);
285285
afs_put_addrlist(old);
286286
}

0 commit comments

Comments
 (0)