efivarfs: use QSTR() in efivarfs_alloc_dentry

Use QSTR() and drop strlen() in efivarfs_alloc_dentry().

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
Thorsten Blum 2026-04-22 14:25:27 +02:00 committed by Ard Biesheuvel
parent 254f49634e
commit a9e8765fd2

View File

@ -191,13 +191,10 @@ static const struct dentry_operations efivarfs_d_ops = {
static struct dentry *efivarfs_alloc_dentry(struct dentry *parent, char *name) static struct dentry *efivarfs_alloc_dentry(struct dentry *parent, char *name)
{ {
struct qstr q = QSTR(name);
struct dentry *d; struct dentry *d;
struct qstr q;
int err; int err;
q.name = name;
q.len = strlen(name);
err = efivarfs_d_hash(parent, &q); err = efivarfs_d_hash(parent, &q);
if (err) if (err)
return ERR_PTR(err); return ERR_PTR(err);