From: Thorsten Blum Date: Tue, 5 May 2026 11:42:42 +0000 (+0200) Subject: namei: use QSTR() instead of QSTR_INIT() in path_pts X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=de7680d9438fa145c90e96a783e3e69405fecd33;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20260505114242.158883-2-thorsten.blum@linux.dev Signed-off-by: Christian Brauner (Amutable) --- diff --git a/fs/namei.c b/fs/namei.c index 4852ca208bd4b..96d553caf9158 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -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;