|
@@ -341,8 +341,8 @@ int afs_cell_init(struct afs_net *net, const char *rootcell)
|
|
|
|
|
|
/* install the new cell */
|
|
|
write_seqlock(&net->cells_lock);
|
|
|
- old_root = net->ws_cell;
|
|
|
- net->ws_cell = new_root;
|
|
|
+ old_root = rcu_access_pointer(net->ws_cell);
|
|
|
+ rcu_assign_pointer(net->ws_cell, new_root);
|
|
|
write_sequnlock(&net->cells_lock);
|
|
|
|
|
|
afs_put_cell(net, old_root);
|
|
@@ -755,8 +755,8 @@ void afs_cell_purge(struct afs_net *net)
|
|
|
_enter("");
|
|
|
|
|
|
write_seqlock(&net->cells_lock);
|
|
|
- ws = net->ws_cell;
|
|
|
- net->ws_cell = NULL;
|
|
|
+ ws = rcu_access_pointer(net->ws_cell);
|
|
|
+ RCU_INIT_POINTER(net->ws_cell, NULL);
|
|
|
write_sequnlock(&net->cells_lock);
|
|
|
afs_put_cell(net, ws);
|
|
|
|