summaryrefslogtreecommitdiff
path: root/fs/fuse/req.c
AgeCommit message (Collapse)Author
12 daysfuse: don't fill in.h.pid in case args->nocreds is setMiklos Szeredi
Commit 794e811d1443 ("fuse: split out filesystem part of request sending") alters the pid sent on force && nocreds requests. Previously these allocated a zeroed request and skipped fuse_force_creds(), so they went out with in.h.pid == 0. In fuse_fill_creds(), args->pid is now set before the nocreds early return, and fuse_args_to_req() copies it unconditionally - so writeback, release, and DESTROY requests now report the triggering (often kernel-worker) pid instead of 0. Move the nocreds check above setting args->pid. Also remove the WARN_ON(!args->nocreds) from the !args->force branch, since it's obviously not going to be triggered. Reported-by: David CARLIER <devnexen@gmail.com> Closes: https://lore.kernel.org/all/CA+XhMqye_NBihcadRTU=w4xAfrdY9rsMB3oHF5+bwHukkjHMoQ@mail.gmail.com/ Fixes: 794e811d1443 ("fuse: split out filesystem part of request sending") Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2026-06-15fuse: split out filesystem part of request sendingMiklos Szeredi
Create a new source file: req.c and add the request sending entry functions: __fuse_simple_request() fuse_simple_background() fuse_simple_notify_reply() Introduce transport layer sending functions that are called by the respective fs layer function: fuse_chan_send() fuse_chan_send_bg() fuse_chan_send_notify_reply() Move calculation of request header fields uid, gid and pid from fuse_get_req() and fuse_force_creads() to a new helper: fuse_fill_creds(). These fileds are now passed to the transport layer via struct fuse_args. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>