aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/libfs.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-09-14 09:33:46 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2024-09-15 02:43:11 -0400
commit1a371190a375f98c9b106f758ea41558c3f92556 (patch)
treec57d5c913ad355360a5a6b7f7f1e74f1539ddd25 /fs/libfs.c
parentMerge tag 'kvmarm-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD (diff)
parentLoongArch: KVM: Implement function kvm_para_has_feature() (diff)
downloadwireguard-linux-1a371190a375f98c9b106f758ea41558c3f92556.tar.xz
wireguard-linux-1a371190a375f98c9b106f758ea41558c3f92556.zip
Merge tag 'loongarch-kvm-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson into HEAD
LoongArch KVM changes for v6.12 1. Revert qspinlock to test-and-set simple lock on VM. 2. Add Loongson Binary Translation extension support. 3. Add PMU support for guest. 4. Enable paravirt feature control from VMM. 5. Implement function kvm_para_has_feature().
Diffstat (limited to 'fs/libfs.c')
-rw-r--r--fs/libfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/libfs.c b/fs/libfs.c
index 02602d00939e..b64b4c44cfea 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -2117,12 +2117,12 @@ struct timespec64 simple_inode_init_ts(struct inode *inode)
}
EXPORT_SYMBOL(simple_inode_init_ts);
-static inline struct dentry *get_stashed_dentry(struct dentry *stashed)
+static inline struct dentry *get_stashed_dentry(struct dentry **stashed)
{
struct dentry *dentry;
guard(rcu)();
- dentry = READ_ONCE(stashed);
+ dentry = rcu_dereference(*stashed);
if (!dentry)
return NULL;
if (!lockref_get_not_dead(&dentry->d_lockref))
@@ -2219,7 +2219,7 @@ int path_from_stashed(struct dentry **stashed, struct vfsmount *mnt, void *data,
const struct stashed_operations *sops = mnt->mnt_sb->s_fs_info;
/* See if dentry can be reused. */
- path->dentry = get_stashed_dentry(*stashed);
+ path->dentry = get_stashed_dentry(stashed);
if (path->dentry) {
sops->put_data(data);
goto out_path;