namei: use QSTR() instead of QSTR_INIT() in path_pts

Drop the hard-coded length argument and use the simpler QSTR(). Inline
the code and drop the local variable.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260505114242.158883-2-thorsten.blum@linux.dev
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
Thorsten Blum 2026-05-05 13:42:42 +02:00 committed by Christian Brauner
parent d90e60ced4
commit de7680d943
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2

View File

@ -3603,7 +3603,6 @@ int path_pts(struct path *path)
*/
struct dentry *parent = dget_parent(path->dentry);
struct dentry *child;
struct qstr this = QSTR_INIT("pts", 3);
if (unlikely(!path_connected(path->mnt, parent))) {
dput(parent);
@ -3611,7 +3610,7 @@ int path_pts(struct path *path)
}
dput(path->dentry);
path->dentry = parent;
child = d_hash_and_lookup(parent, &this);
child = d_hash_and_lookup(parent, &QSTR("pts"));
if (IS_ERR_OR_NULL(child))
return -ENOENT;