Skip to content

Commit

Permalink
FreeBSD: restore zfs_znode_update_vfs()
Browse files Browse the repository at this point in the history
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 <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes openzfs#16554
  • Loading branch information
robn authored and tonyhutter committed Nov 20, 2024
1 parent ba4e582 commit 84ad1d5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions module/os/freebsd/zfs/zfs_znode_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 84ad1d5

Please sign in to comment.