summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2026-05-05 14:42:42 +0300
committerChristian Brauner <brauner@kernel.org>2026-05-21 14:39:36 +0300
commitde7680d9438fa145c90e96a783e3e69405fecd33 (patch)
tree2f77b36e9047bdb3cefa2af6b053af5c4306b506
parentd90e60ced4c3c7cd55ba0bedcedd1090d0172ce0 (diff)
downloadlinux-de7680d9438fa145c90e96a783e3e69405fecd33.tar.xz
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>
-rw-r--r--fs/namei.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 4852ca208bd4..96d553caf915 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;