From 8b7239681e27ab75175c45c48e6ad1685571b1f2 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Wed, 17 Feb 2021 14:35:56 +0200 Subject: [PATCH] ext2fs: clear write cluster tracking on truncation Reviewed by: fsu, mckusick Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28679 --- sys/fs/ext2fs/ext2_inode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/fs/ext2fs/ext2_inode.c b/sys/fs/ext2fs/ext2_inode.c index 1e7584ebaa66..34c32f2f113d 100644 --- a/sys/fs/ext2fs/ext2_inode.c +++ b/sys/fs/ext2fs/ext2_inode.c @@ -581,6 +581,7 @@ ext2_truncate(struct vnode *vp, off_t length, int flags, struct ucred *cred, error = ext2_ext_truncate(vp, length, flags, cred, td); else error = ext2_ind_truncate(vp, length, flags, cred, td); + cluster_init_vn(&ip->i_clusterw); return (error); }