Re: [PATCH] fuse: cache POSIX ACLs when setting them

Horst Birthelmer <[email protected]> Wed, 1 Jul 2026 13:39:16 +0200
Newsgroups dev.linux.lists.fuse-devel,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Wed, Jul 01, 2026 at 12:00:52PM +0100, Luis Henriques wrote:
> When setting an ACL in an inode we can immediately add it to the cache.
> This is a small optimisation, as currently an ACL is only added to the
> cache when reading it again, which involves an extra GETXATTR hop into
> user-space.
> 
> Signed-off-by: Luis Henriques <[email protected]>
> ---
>  fs/fuse/acl.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/fuse/acl.c b/fs/fuse/acl.c
> index 31fb50e16aed..c2584bb75ec7 100644
> --- a/fs/fuse/acl.c
> +++ b/fs/fuse/acl.c
> @@ -155,6 +155,8 @@ int fuse_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
>  		 */
>  		forget_all_cached_acls(inode);
>  		fuse_invalidate_attr(inode);
> +		if (!ret)
> +			set_cached_acl(inode, type, acl);
>  	}
>  
>  	return ret;
> 

LGTM

Feel free to add
Reviewed-By: Horst Birthelmer <[email protected]>