]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fuse: reduce attributes invalidated on directory change
authorKonrad Sztyber <ksztyber@nvidia.com>
Tue, 14 Apr 2026 08:27:23 +0000 (10:27 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 15 Jun 2026 12:06:18 +0000 (14:06 +0200)
commitfde04c3d6f2bbc5c8fe25c99fd640f57e1e80d10
treee954dc53393f7b7d578505ba32ab2fdbaeeae8f0
parent8c72b1f0e2a284f6c775789a7a52f772a1052d3e
fuse: reduce attributes invalidated on directory change

When the contents of a directory is modified, some of its attributes may
also change, so they need to be invalidated.  But this isn't the case
for every attribute.  For instance, unlinking or creating a file doesn't
change the uid/gid of its parent directory.

This can cause unnecessary FUSE_GETATTRs to be sent to user-space.  For
example, fuse_permission() checks if mode, uid, and gid are valid and
will issue a FUSE_GETATTR if they're not, which results in an extra
FUSE_GETATTR request for every FUSE_UNLINK when removing files in the
same directory.

Signed-off-by: Konrad Sztyber <ksztyber@nvidia.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/dir.c
fs/fuse/fuse_i.h