summaryrefslogtreecommitdiff
path: root/fs/exportfs
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2025-05-13 17:10:08 +0200
committerChristian Brauner <brauner@kernel.org>2025-05-15 11:26:05 +0200
commite0410e956b97e8b50b2aa7b02ba70e5f09b31ebe (patch)
treed5a6a2771ac9b29d2f65e74ecb61e4d0a627f446 /fs/exportfs
parente7b9cea718eee4585a947b10086ca51ad27ef5d4 (diff)
readdir: supply dir_context.count as readdir buffer size hint
This is a preparation for large readdir buffers in fuse. Simply setting the fuse buffer size to the userspace buffer size should work, the record sizes are similar (fuse's is slightly larger than libc's, so no overflow should ever happen). Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Signed-off-by: Jaco Kroon <jaco@uls.co.za> Link: https://lore.kernel.org/20250513151012.1476536-1-mszeredi@redhat.com Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/exportfs')
-rw-r--r--fs/exportfs/expfs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c
index 128dd092916b..48f0c505b50f 100644
--- a/fs/exportfs/expfs.c
+++ b/fs/exportfs/expfs.c
@@ -284,6 +284,7 @@ static int get_name(const struct path *path, char *name, struct dentry *child)
};
struct getdents_callback buffer = {
.ctx.actor = filldir_one,
+ .ctx.count = INT_MAX,
.name = name,
};