Skip to content

FreeBSD: Return ifndef IN_BASE back to fix the build #16808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 3 additions & 19 deletions include/os/freebsd/spl/sys/vnode.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,25 +68,14 @@ enum symfollow { NO_FOLLOW = NOFOLLOW };
#include <vm/vm_object.h>

typedef struct vop_vector vnodeops_t;
#define VOP_FID VOP_VPTOFH
#define vop_fid vop_vptofh
#define vop_fid_args vop_vptofh_args
#define a_fid a_fhp

#define rootvfs (rootvnode == NULL ? NULL : rootvnode->v_mount)

#ifndef IN_BASE
static __inline int
vn_is_readonly(vnode_t *vp)
{
return (vp->v_mount->mnt_flag & MNT_RDONLY);
}
#endif
#define vn_vfswlock(vp) (0)
#define vn_vfsunlock(vp) do { } while (0)
#define vn_ismntpt(vp) \
((vp)->v_type == VDIR && (vp)->v_mountedhere != NULL)
#define vn_mountedvfs(vp) ((vp)->v_mountedhere)

#ifndef IN_BASE
#define vn_has_cached_data(vp) \
((vp)->v_object != NULL && \
(vp)->v_object->resident_page_count > 0)
Expand All @@ -101,10 +90,8 @@ 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)
#define vn_free(vp) do { } while (0)
#define vn_matchops(vp, vops) ((vp)->v_op == &(vops))

#define VN_HOLD(v) vref(v)
Expand All @@ -119,9 +106,6 @@ vn_flush_cached_data(vnode_t *vp, boolean_t sync)
#define vnevent_rename_dest(vp, dvp, name, ct) do { } while (0)
#define vnevent_rename_dest_dir(vp, ct) do { } while (0)

#define specvp(vp, rdev, type, cr) (VN_HOLD(vp), (vp))
#define MANDLOCK(vp, mode) (0)

/*
* We will use va_spare is place of Solaris' va_mask.
* This field is initialized in zfs_setattr().
Expand Down
2 changes: 0 additions & 2 deletions module/os/freebsd/zfs/zfs_znode_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,6 @@ zfs_znode_sa_init(zfsvfs_t *zfsvfs, znode_t *zp,
*/
if (zp->z_id == zfsvfs->z_root && zfsvfs->z_parent == zfsvfs)
ZTOV(zp)->v_flag |= VROOT;

vn_exists(ZTOV(zp));
}

void
Expand Down