Skip to content

Commit eb9ca48

Browse files
robnlundman
authored andcommitted
FreeBSD: restore zfs_znode_update_vfs()
I accidentally removed this in c22d56e, 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/ Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Rob Norris <[email protected]> Closes openzfs#16554
1 parent 418ff83 commit eb9ca48

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

module/os/freebsd/zfs/zfs_znode_os.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,6 +1779,18 @@ zfs_create_fs(objset_t *os, cred_t *cr, nvlist_t *zplprops, dmu_tx_t *tx)
17791779
kmem_free(zfsvfs, sizeof (zfsvfs_t));
17801780
}
17811781

1782+
void
1783+
zfs_znode_update_vfs(znode_t *zp)
1784+
{
1785+
vm_object_t object;
1786+
1787+
if ((object = ZTOV(zp)->v_object) == NULL ||
1788+
zp->z_size == object->un_pager.vnp.vnp_size)
1789+
return;
1790+
1791+
vnode_pager_setsize(ZTOV(zp), zp->z_size);
1792+
}
1793+
17821794
int
17831795
zfs_znode_parent_and_name(znode_t *zp, znode_t **dzpp, char *buf)
17841796
{

0 commit comments

Comments
 (0)