[PATCH] fuse: use QSTR() instead of QSTR_INIT() in fuse_get_dentry

Thorsten Blum posted 1 patch 1 month, 3 weeks ago
There is a newer version of this series
fs/fuse/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] fuse: use QSTR() instead of QSTR_INIT() in fuse_get_dentry
Posted by Thorsten Blum 1 month, 3 weeks ago
Drop the hard-coded length argument and use the simpler QSTR().

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 fs/fuse/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index deddfffb037f..d224bcba593b 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -1113,7 +1113,7 @@ static struct dentry *fuse_get_dentry(struct super_block *sb,
 	inode = ilookup5(sb, handle->nodeid, fuse_inode_eq, &handle->nodeid);
 	if (!inode) {
 		struct fuse_entry_out outarg;
-		const struct qstr name = QSTR_INIT(".", 1);
+		const struct qstr name = QSTR(".");
 
 		if (!fc->export_support)
 			goto out_err;
Re: [PATCH] fuse: use QSTR() instead of QSTR_INIT() in fuse_get_dentry
Posted by Al Viro 1 month, 3 weeks ago
On Wed, Apr 22, 2026 at 02:39:12PM +0200, Thorsten Blum wrote:
> Drop the hard-coded length argument and use the simpler QSTR().
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
>  fs/fuse/inode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
> index deddfffb037f..d224bcba593b 100644
> --- a/fs/fuse/inode.c
> +++ b/fs/fuse/inode.c
> @@ -1113,7 +1113,7 @@ static struct dentry *fuse_get_dentry(struct super_block *sb,
>  	inode = ilookup5(sb, handle->nodeid, fuse_inode_eq, &handle->nodeid);
>  	if (!inode) {
>  		struct fuse_entry_out outarg;
> -		const struct qstr name = QSTR_INIT(".", 1);
> +		const struct qstr name = QSTR(".");
>  
>  		if (!fc->export_support)
>  			goto out_err;
> 

What's wrong with
                err = fuse_lookup_name(sb, handle->nodeid, &QSTR("."), &outarg,
				       &inode);
to start with?