mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
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:
parent
254f49634e
commit
a9e8765fd2
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user