Skip to contentSkip to conversation

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

PATCH Superseded Thorsten Blum 2 participants 2 messages Apr 22

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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

Drop the hard-coded length argument and use the simpler QSTR().

---
 fs/fuse/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fuse/inode.c +1 -1
index deddfffb037f..d224bcba593b 100644
@@ -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;
maintainer
#1 lore raw
Quoted 13 lines · Thorsten Blum

Drop the hard-coded length argument and use the simpler QSTR().

---
 fs/fuse/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fuse/inode.c +0 -0
index deddfffb037f..d224bcba593b 100644

fs/fuse/inode.c static struct dentry *fuse_get_dentry(struct super_block *sb, · line 1119

Quoted 8 lines
fs/fuse/inode.c +1 -1
@@ -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?