Skip to content

Commit

Permalink
FreeBSD: Remove some illumos compat from vnode.h
Browse files Browse the repository at this point in the history
Should make no difference, just some dead code cleanup.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Martin Matuska <[email protected]>
Signed-off-by:Alexander Motin <[email protected]>
Sponsored by: iXsystems, Inc.
Closes openzfs#16808
  • Loading branch information
amotin authored and behlendorf committed Dec 3, 2024
1 parent ae00c80 commit 654ade8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
22 changes: 2 additions & 20 deletions include/os/freebsd/spl/sys/vnode.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,30 +68,18 @@ 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)

#ifndef IN_BASE
static __inline void
vn_flush_cached_data(vnode_t *vp, boolean_t sync)
{
Expand All @@ -104,9 +92,6 @@ vn_flush_cached_data(vnode_t *vp, boolean_t sync)
}
#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 @@ -121,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

0 comments on commit 654ade8

Please sign in to comment.