From: Joanne Koong <joannelkoong@gmail.com>
To: miklos@szeredi.hu
Cc: amir73il@gmail.com, fuse-devel@lists.linux.dev, luis@igalia.com
Subject: [PATCH v1 14/17] fuse: use passthrough getattr in setattr suid/sgid handling
Date: Mon, 20 Apr 2026 15:16:34 -0700 [thread overview]
Message-ID: <20260420221637.2631478-15-joannelkoong@gmail.com> (raw)
In-Reply-To: <20260420221637.2631478-1-joannelkoong@gmail.com>
When refreshing i_mode for suid/sgid kill during setattr, use
passthrough getattr if the inode has that enabled.
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
---
fs/fuse/dir.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 637761de2c5b..ff9a92d8a496 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -2524,7 +2524,11 @@ static int fuse_setattr(struct mnt_idmap *idmap, struct dentry *entry,
* ia_mode calculation may have used stale i_mode.
* Refresh and recalculate.
*/
- ret = fuse_do_getattr(idmap, inode, NULL, file);
+ if (fuse_inode_passthrough_op(inode, FUSE_GETATTR))
+ ret = fuse_passthrough_getattr(inode, NULL,
+ STATX_MODE, 0);
+ else
+ ret = fuse_do_getattr(idmap, inode, NULL, file);
if (ret)
return ret;
--
2.52.0
next prev parent reply other threads:[~2026-04-20 22:18 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 22:16 [PATCH v1 00/17] fuse: extend passthrough to inode operations Joanne Koong
2026-04-20 22:16 ` [PATCH v1 01/17] fuse: introduce FUSE_PASSTHROUGH_INO mode Joanne Koong
2026-04-21 21:11 ` Darrick J. Wong
2026-04-21 23:38 ` Joanne Koong
2026-04-20 22:16 ` [PATCH v1 02/17] fuse: prepare for passthrough of inode operations Joanne Koong
2026-04-21 21:16 ` Darrick J. Wong
2026-04-22 1:12 ` Joanne Koong
2026-04-20 22:16 ` [PATCH v1 03/17] fuse: prepare for readdir passthrough on directories Joanne Koong
2026-04-21 21:17 ` Darrick J. Wong
2026-04-21 23:12 ` Joanne Koong
2026-04-20 22:16 ` [PATCH v1 04/17] fuse: implement passthrough for readdir Joanne Koong
2026-04-20 22:16 ` [PATCH v1 05/17] fuse: prepare for long lived reference on backing file Joanne Koong
2026-04-20 22:16 ` [PATCH v1 06/17] fuse: implement passthrough for getattr/statx Joanne Koong
2026-04-20 22:16 ` [PATCH v1 07/17] fuse: prepare to setup backing inode passthrough on lookup Joanne Koong
2026-04-20 22:16 ` [PATCH v1 08/17] fuse: add passthrough ops gating Joanne Koong
2026-04-21 10:48 ` Amir Goldstein
2026-04-22 2:57 ` Joanne Koong
2026-04-22 7:27 ` Amir Goldstein
2026-04-23 1:47 ` Joanne Koong
2026-04-20 22:16 ` [PATCH v1 09/17] fuse: prepare to cache statx attributes from entry replies Joanne Koong
2026-04-21 12:26 ` Amir Goldstein
2026-04-20 22:16 ` [PATCH v1 10/17] fuse: add struct fuse_entry2_out and helpers for extended " Joanne Koong
2026-04-21 12:25 ` Amir Goldstein
2026-04-22 0:50 ` Joanne Koong
2026-04-20 22:16 ` [PATCH v1 11/17] fuse: add passthrough lookup Joanne Koong
2026-04-21 13:23 ` Amir Goldstein
2026-04-22 3:17 ` Joanne Koong
2026-04-20 22:16 ` [PATCH v1 12/17] fuse: add passthrough support for entry creation Joanne Koong
2026-04-21 14:08 ` Amir Goldstein
2026-04-22 3:01 ` Joanne Koong
2026-04-20 22:16 ` [PATCH v1 13/17] fuse: add passthrough support for atomic file creation Joanne Koong
2026-04-21 19:51 ` Amir Goldstein
2026-04-22 0:40 ` Joanne Koong
2026-04-22 5:10 ` Amir Goldstein
2026-04-20 22:16 ` Joanne Koong [this message]
2026-04-21 14:25 ` [PATCH v1 14/17] fuse: use passthrough getattr in setattr suid/sgid handling Amir Goldstein
2026-04-22 3:48 ` Joanne Koong
2026-04-22 5:22 ` Amir Goldstein
2026-04-23 0:03 ` Joanne Koong
2026-04-20 22:16 ` [PATCH v1 15/17] fuse: add passthrough setattr Joanne Koong
2026-04-21 14:20 ` Amir Goldstein
2026-04-21 14:32 ` Amir Goldstein
2026-04-22 1:09 ` Joanne Koong
2026-04-20 22:16 ` [PATCH v1 16/17] fuse: add passthrough open Joanne Koong
2026-04-21 20:20 ` Amir Goldstein
2026-04-22 4:19 ` Joanne Koong
2026-04-22 4:23 ` Joanne Koong
2026-04-22 6:51 ` Amir Goldstein
2026-04-20 22:16 ` [PATCH v1 17/17] docs: fuse: document extended passthrough (FUSE_PASSTHROUGH_INO) Joanne Koong
2026-04-21 11:09 ` Amir Goldstein
2026-04-22 1:04 ` Joanne Koong
2026-04-21 9:37 ` [PATCH v1 00/17] fuse: extend passthrough to inode operations Amir Goldstein
2026-04-21 13:55 ` Amir Goldstein
2026-04-21 21:05 ` Joanne Koong
2026-04-22 6:02 ` Amir Goldstein
2026-04-23 1:02 ` Joanne Koong
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=20260420221637.2631478-15-joannelkoong@gmail.com \
--to=joannelkoong@gmail.com \
--cc=amir73il@gmail.com \
--cc=fuse-devel@lists.linux.dev \
--cc=luis@igalia.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.