diff options
author | Rob Norris <[email protected]> | 2024-09-22 03:03:54 +1000 |
---|---|---|
committer | GitHub <[email protected]> | 2024-09-21 10:03:54 -0700 |
commit | 80645d65826075043a008e3821550acee6b85238 (patch) | |
tree | 7f93732f2289e728762d652827707cd52acb1a23 | |
parent | f9d4f1b480beaaa67373a9cdff6652cff255fea8 (diff) |
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/
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes #16554
-rw-r--r-- | module/os/freebsd/zfs/zfs_znode_os.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/module/os/freebsd/zfs/zfs_znode_os.c b/module/os/freebsd/zfs/zfs_znode_os.c index ca247576a..fea34273b 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) { |