]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
efivarfs: use QSTR() in efivarfs_alloc_dentry
authorThorsten Blum <thorsten.blum@linux.dev>
Wed, 22 Apr 2026 12:25:27 +0000 (14:25 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 28 Apr 2026 10:30:59 +0000 (12:30 +0200)
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>
fs/efivarfs/super.c

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