Re: [PATCH] namei: use QSTR() instead of QSTR_INIT() in path_pts
From: Jan Kara
Date: Wed Apr 22 2026 - 08:58:31 EST
On Wed 22-04-26 14:30:03, Thorsten Blum wrote:
> Drop the hard-coded length argument and use the simpler QSTR().
>
> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
Looks good. Feel free to add:
Reviewed-by: Jan Kara <jack@xxxxxxx>
Honza
> ---
> fs/namei.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/namei.c b/fs/namei.c
> index c7fac83c9a85..817bba800d7b 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -3617,7 +3617,7 @@ int path_pts(struct path *path)
> */
> struct dentry *parent = dget_parent(path->dentry);
> struct dentry *child;
> - struct qstr this = QSTR_INIT("pts", 3);
> + struct qstr this = QSTR("pts");
>
> if (unlikely(!path_connected(path->mnt, parent))) {
> dput(parent);
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR