[PATCH] efivarfs: Unconstify variable

From: Thierry Reding

Date: Tue Apr 28 2026 - 05:53:12 EST


The qstr structure is being written to in efivarfs_d_hash(), so it
cannot be made const.

Signed-off-by: Thierry Reding <treding@xxxxxxxxxx>
---
fs/efivarfs/super.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c
index 360d152e18af..733c19571f1c 100644
--- a/fs/efivarfs/super.c
+++ b/fs/efivarfs/super.c
@@ -167,7 +167,7 @@ static int efivarfs_d_compare(const struct dentry *dentry,
return strncasecmp(name->name + guid, str + guid, EFI_VARIABLE_GUID_LEN);
}

-static int efivarfs_d_hash(const struct dentry *dentry, const struct qstr *qstr)
+static int efivarfs_d_hash(const struct dentry *dentry, struct qstr *qstr)
{
unsigned long hash = init_name_hash(dentry);
const unsigned char *s = qstr->name;
@@ -191,7 +191,7 @@ static const struct dentry_operations efivarfs_d_ops = {

static struct dentry *efivarfs_alloc_dentry(struct dentry *parent, char *name)
{
- const struct qstr q = QSTR(name);
+ struct qstr q = QSTR(name);
struct dentry *d;
int err;

--
2.52.0
--- >8 ---

--- >8 ---