diff options
author | Christian Brauner <brauner@kernel.org> | 2025-03-10 11:09:25 +0100 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-03-10 11:09:25 +0100 |
commit | accdd1198eaafd82d03390def709c9865ea5859b (patch) | |
tree | 65bb2110f468bcfc92d6da15fc1a96579e607725 /fs/afs/proc.c | |
parent | 00a7d39898c8010bfd5ff62af31ca5db34421b38 (diff) | |
parent | 823869e1e61607ab0d433de3c8abed221dc80a5e (diff) |
Merge afs RCU pathwalk fix
Bring in the fix for afs_atcell_get_link() to handle RCU pathwalk from
the afs branch for this cycle. This fix has to go upstream now.
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/afs/proc.c')
-rw-r--r-- | fs/afs/proc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/afs/proc.c b/fs/afs/proc.c index e7614f4f30c2..12c88d8be3fe 100644 --- a/fs/afs/proc.c +++ b/fs/afs/proc.c @@ -206,7 +206,7 @@ static int afs_proc_rootcell_show(struct seq_file *m, void *v) net = afs_seq2net_single(m); down_read(&net->cells_lock); - cell = net->ws_cell; + cell = rcu_dereference_protected(net->ws_cell, lockdep_is_held(&net->cells_lock)); if (cell) seq_printf(m, "%s\n", cell->name); up_read(&net->cells_lock); @@ -242,7 +242,7 @@ static int afs_proc_rootcell_write(struct file *file, char *buf, size_t size) ret = -EEXIST; inode_lock(file_inode(file)); - if (!net->ws_cell) + if (!rcu_access_pointer(net->ws_cell)) ret = afs_cell_init(net, buf); else printk("busy\n"); |