[PATCH 14/19] fuse2fs: cache symlink targets in the kernel

Darrick J. Wong
2025-11-06T22:34:48Z

Speed up symlinks by allowing the kernel to cache them.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
misc/fuse2fs.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c
index f1fb7227f1d077..c1bd76ba449370 100644
--- a/misc/fuse2fs.c
+++ b/misc/fuse2fs.c
@@ -1031,6 +1031,9 @@ static void *op_init(struct fuse_conn_info *conn
if (ff->acl)
conn->want |= FUSE_CAP_POSIX_ACL;
#endif
+#ifdef FUSE_CAP_CACHE_SYMLINKS
+ conn->want |= FUSE_CAP_CACHE_SYMLINKS;
+#endif
#if FUSE_VERSION >= FUSE_MAKE_VERSION(3, 0)
conn->time_gran = 1;
cfg->use_ino = 1;