summaryrefslogtreecommitdiff
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-09-14 16:33:46 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2024-09-15 09:43:11 +0300
commit1a371190a375f98c9b106f758ea41558c3f92556 (patch)
treec57d5c913ad355360a5a6b7f7f1e74f1539ddd25 /fs/dcache.c
parent091b2ecaa3081b8dee90c4fb31e782e8e3107a77 (diff)
parent3abb708ec0be25da16a1ee9f1ab5cbc93f3256f3 (diff)
downloadlinux-1a371190a375f98c9b106f758ea41558c3f92556.tar.xz
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/dcache.c')
-rw-r--r--fs/dcache.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 3d8daaecb6d1..6386b9b625dd 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -96,11 +96,16 @@ EXPORT_SYMBOL(dotdot_name);
*
* This hash-function tries to avoid losing too many bits of hash
* information, yet avoid using a prime hash-size or similar.
+ *
+ * Marking the variables "used" ensures that the compiler doesn't
+ * optimize them away completely on architectures with runtime
+ * constant infrastructure, this allows debuggers to see their
+ * values. But updating these values has no effect on those arches.
*/
-static unsigned int d_hash_shift __ro_after_init;
+static unsigned int d_hash_shift __ro_after_init __used;
-static struct hlist_bl_head *dentry_hashtable __ro_after_init;
+static struct hlist_bl_head *dentry_hashtable __ro_after_init __used;
static inline struct hlist_bl_head *d_hash(unsigned long hashlen)
{