Skip to content

Commit f4cbd7f

Browse files
author
Ryan Moeller
committed
FreeBSD: Prune some unneeded definitions
IS_XATTRDIR is never used. v_count is only used in two places, one immediately followed by the use of the real name, v_usecount. Signed-off-by: Ryan Moeller <[email protected]>
1 parent 056a658 commit f4cbd7f

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

include/os/freebsd/spl/sys/vnode.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,8 @@ typedef struct vop_vector vnodeops_t;
6666
#define vop_fid_args vop_vptofh_args
6767
#define a_fid a_fhp
6868

69-
#define IS_XATTRDIR(dvp) (0)
70-
71-
#define v_count v_usecount
72-
7369
#define rootvfs (rootvnode == NULL ? NULL : rootvnode->v_mount)
7470

75-
7671
#ifndef IN_BASE
7772
static __inline int
7873
vn_is_readonly(vnode_t *vp)

module/os/freebsd/spl/spl_vfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ mount_snapshot(kthread_t *td, vnode_t **vpp, const char *fstype, char *fspath,
275275
void
276276
vn_rele_async(vnode_t *vp, taskq_t *taskq)
277277
{
278-
VERIFY(vp->v_count > 0);
278+
VERIFY(vp->v_usecount > 0);
279279
if (refcount_release_if_not_last(&vp->v_usecount)) {
280280
#if __FreeBSD_version < 1300045
281281
vdrop(vp);

module/os/freebsd/zfs/zfs_vfsops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1593,7 +1593,7 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolean_t unmounting)
15931593
for (zp = list_head(&zfsvfs->z_all_znodes); zp != NULL;
15941594
zp = list_next(&zfsvfs->z_all_znodes, zp))
15951595
if (zp->z_sa_hdl) {
1596-
ASSERT(ZTOV(zp)->v_count >= 0);
1596+
ASSERT(ZTOV(zp)->v_usecount >= 0);
15971597
zfs_znode_dmu_fini(zp);
15981598
}
15991599
mutex_exit(&zfsvfs->z_znodes_lock);

0 commit comments

Comments
 (0)