Skip to contentSkip to conversation

fuse: use QSTR() instead of QSTR_INIT() in fuse_get_dentry

PATCH Superseded Thorsten Blum 1 participant 1 message May 17

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 fuse: use QSTR() instead of QSTR_INIT() in fuse_get_dentry

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

---
Changes in v2:
- Inline QSTR() and drop the local variable as suggested by Al Viro
- v1: https://lore.kernel.org/lkml/[email protected]/

---
 fs/fuse/inode.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/fuse/inode.c +1 -2
index 0897f8e62b4d..51df88e43f6f 100644
@@ -1064,12 +1064,11 @@ 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);
 
 		if (!fc->export_support)
 			goto out_err;
 
-		err = fuse_lookup_name(sb, handle->nodeid, &name, &outarg,
+		err = fuse_lookup_name(sb, handle->nodeid, &QSTR("."), &outarg,
 				       &inode);
 		if (err && err != -ENOENT)
 			goto out_err;