diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index f1d4bc0cdabe..161d4fea7f5b 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1832,6 +1832,12 @@ int __vfs_statfs(struct mount *mp, struct statfs *sbp) { + /* + * Filesystems only fill in part of the structure for updates, we + * have to read the entirety first to get all content. + */ + memcpy(sbp, &mp->mnt_stat, sizeof(*sbp)); + /* * Set these in case the underlying filesystem fails to do so. */