From 7095e08818cc927ceabea4080cf4ea94e9125eec Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sat, 21 Sep 2024 10:40:36 +1000 Subject: [PATCH] FreeBSD: restore zfs_znode_update_vfs() I accidentally removed this in c22d56e3e, and didn't notice because it doesn't fail the build, but does fail to load into the kernel because it can't link it. Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris --- module/os/freebsd/zfs/zfs_znode_os.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/module/os/freebsd/zfs/zfs_znode_os.c b/module/os/freebsd/zfs/zfs_znode_os.c index ca247576a0ab..fea34273baef 100644 --- a/module/os/freebsd/zfs/zfs_znode_os.c +++ b/module/os/freebsd/zfs/zfs_znode_os.c @@ -1779,6 +1779,18 @@ zfs_create_fs(objset_t *os, cred_t *cr, nvlist_t *zplprops, dmu_tx_t *tx) kmem_free(zfsvfs, sizeof (zfsvfs_t)); } +void +zfs_znode_update_vfs(znode_t *zp) +{ + vm_object_t object; + + if ((object = ZTOV(zp)->v_object) == NULL || + zp->z_size == object->un_pager.vnp.vnp_size) + return; + + vnode_pager_setsize(ZTOV(zp), zp->z_size); +} + int zfs_znode_parent_and_name(znode_t *zp, znode_t **dzpp, char *buf) {