Skip to content

Commit 8d8f9c4

Browse files
author
Miklos Szeredi
committed
fuse: handle empty request_mask in statx
If no attribute is requested, then don't send request to userspace. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
1 parent b5a2a3a commit 8d8f9c4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

fs/fuse/dir.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,12 @@ static int fuse_update_get_attr(struct inode *inode, struct file *file,
12091209
u32 inval_mask = READ_ONCE(fi->inval_mask);
12101210
u32 cache_mask = fuse_get_cache_mask(inode);
12111211

1212-
if (flags & AT_STATX_FORCE_SYNC)
1212+
/* FUSE only supports basic stats */
1213+
request_mask &= STATX_BASIC_STATS;
1214+
1215+
if (!request_mask)
1216+
sync = false;
1217+
else if (flags & AT_STATX_FORCE_SYNC)
12131218
sync = true;
12141219
else if (flags & AT_STATX_DONT_SYNC)
12151220
sync = false;

0 commit comments

Comments
 (0)