Re: [PATCH] efivarfs: use QSTR() in efivarfs_alloc_dentry

"Ard Biesheuvel" <[email protected]>
Newsgroups org.kernel.vger.linux-efi,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Hi Thorsten,

On Wed, 22 Apr 2026, at 14:25, Thorsten Blum wrote:
> Use QSTR() and drop strlen() in efivarfs_alloc_dentry().
>
> Signed-off-by: Thorsten Blum <[email protected]>
> ---
>  fs/efivarfs/super.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>

I'll queue this up once -rc1 comes around. Thanks.

> diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c
> index 1c5224cf183e..95a685f022e6 100644
> --- a/fs/efivarfs/super.c
> +++ b/fs/efivarfs/super.c
> @@ -192,12 +192,9 @@ static const struct dentry_operations efivarfs_d_ops = {
>  static struct dentry *efivarfs_alloc_dentry(struct dentry *parent, char *name)
>  {
>  	struct dentry *d;
> -	struct qstr q;
> +	struct qstr q = QSTR(name);
>  	int err;
> 
> -	q.name = name;
> -	q.len = strlen(name);
> -
>  	err = efivarfs_d_hash(parent, &q);
>  	if (err)
>  		return ERR_PTR(err);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.