From 50ea6f8697712a67dcd6bfe2a033c34f126d1f66 Mon Sep 17 00:00:00 2001 From: Emil Tsalapatis Date: Wed, 7 Feb 2024 18:04:55 -0500 Subject: [PATCH] fusefs: invalidate cached file size when truncating --- sys/fs/fuse/fuse_internal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/fs/fuse/fuse_internal.c b/sys/fs/fuse/fuse_internal.c index ffbf1f9bcc40d6..e523c7d3db0ad3 100644 --- a/sys/fs/fuse/fuse_internal.c +++ b/sys/fs/fuse/fuse_internal.c @@ -1175,6 +1175,8 @@ int fuse_internal_setattr(struct vnode *vp, struct vattr *vap, fsai->valid |= FATTR_FH; } VTOFUD(vp)->flag &= ~FN_SIZECHANGE; + + fvdat->cached_attrs.va_size = VNOVAL; } if (vap->va_atime.tv_sec != VNOVAL) { fsai->atime = vap->va_atime.tv_sec;