Skip to content

Commit

Permalink
FreeBSD: Return ifndef IN_BASE back to fix the build
Browse files Browse the repository at this point in the history
FreeBSD's libprocstat seems to build kernel code in user space,
which does not work here due to undefined vnode_t.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Martin Matuska <mm@FreeBSD.org>
Signed-off-by:Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #16808
  • Loading branch information
amotin authored and behlendorf committed Dec 3, 2024
1 parent 027b3e0 commit ae00c80
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/os/freebsd/spl/sys/vnode.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ vn_is_readonly(vnode_t *vp)
((vp)->v_object != NULL && \
(vp)->v_object->resident_page_count > 0)

#ifndef IN_BASE
static __inline void
vn_flush_cached_data(vnode_t *vp, boolean_t sync)
{
Expand All @@ -101,6 +102,7 @@ vn_flush_cached_data(vnode_t *vp, boolean_t sync)
zfs_vmobject_wunlock(vp->v_object);
}
}
#endif

#define vn_exists(vp) do { } while (0)
#define vn_invalid(vp) do { } while (0)
Expand Down

0 comments on commit ae00c80

Please sign in to comment.