From: horst@birthelmer.com
To: Miklos Szeredi <miklos@szeredi.hu>,
Bernd Schubert <bschubert@ddn.com>,
Joanne Koong <joannelkoong@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Horst Birthelmer <hbirthelmer@ddn.com>
Subject: [PATCH RFC v3 3/3] fuse: use the newly created helper functions
Date: Thu, 08 Jan 2026 15:23:36 +0100 [thread overview]
Message-ID: <20260108-fuse-compounds-upstream-v3-3-8dc91ebf3740@ddn.com> (raw)
In-Reply-To: <20260108-fuse-compounds-upstream-v3-0-8dc91ebf3740@ddn.com>
From: Horst Birthelmer <hbirthelmer@ddn.com>
new helper functions are:
- fuse_getattr_args_fill()
- fuse_open_args_fill()
Signed-off-by: Horst Birthelmer <hbirthelmer@ddn.com>
---
fs/fuse/dir.c | 9 +--------
fs/fuse/file.c | 9 +--------
2 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 4b6b3d2758ff..ca8b69282c60 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1493,14 +1493,7 @@ static int fuse_do_getattr(struct mnt_idmap *idmap, struct inode *inode,
inarg.getattr_flags |= FUSE_GETATTR_FH;
inarg.fh = ff->fh;
}
- args.opcode = FUSE_GETATTR;
- args.nodeid = get_node_id(inode);
- args.in_numargs = 1;
- args.in_args[0].size = sizeof(inarg);
- args.in_args[0].value = &inarg;
- args.out_numargs = 1;
- args.out_args[0].size = sizeof(outarg);
- args.out_args[0].value = &outarg;
+ fuse_getattr_args_fill(&args, get_node_id(inode), &inarg, &outarg);
err = fuse_simple_request(fm, &args);
if (!err) {
if (fuse_invalid_attr(&outarg.attr) ||
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 676f6bfde9f8..c0375b32967d 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -73,14 +73,7 @@ static int fuse_send_open(struct fuse_mount *fm, u64 nodeid,
inarg.open_flags |= FUSE_OPEN_KILL_SUIDGID;
}
- args.opcode = opcode;
- args.nodeid = nodeid;
- args.in_numargs = 1;
- args.in_args[0].size = sizeof(inarg);
- args.in_args[0].value = &inarg;
- args.out_numargs = 1;
- args.out_args[0].size = sizeof(*outargp);
- args.out_args[0].value = outargp;
+ fuse_open_args_fill(&args, nodeid, opcode, &inarg, outargp);
return fuse_simple_request(fm, &args);
}
--
2.51.0
next prev parent reply other threads:[~2026-01-08 14:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-08 14:23 [PATCH RFC v3 0/3] fuse: compound commands horst
2026-01-08 14:23 ` [PATCH RFC v3 1/3] fuse: add compound command to combine multiple requests horst
2026-01-08 22:01 ` Bernd Schubert
2026-01-08 22:12 ` Joanne Koong
2026-01-08 14:23 ` [PATCH RFC v3 2/3] fuse: add an implementation of open+getattr horst
2026-01-08 14:23 ` horst [this message]
2026-01-08 22:19 ` [PATCH RFC v3 3/3] fuse: use the newly created helper functions Joanne Koong
2026-01-09 7:20 ` Horst Birthelmer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260108-fuse-compounds-upstream-v3-3-8dc91ebf3740@ddn.com \
--to=horst@birthelmer.com \
--cc=bschubert@ddn.com \
--cc=hbirthelmer@ddn.com \
--cc=joannelkoong@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®