Skip to content

Commit

Permalink
Unused code was accidentally brought back
Browse files Browse the repository at this point in the history
  • Loading branch information
lundman committed Sep 5, 2018
1 parent 6599ae6 commit 3b4eef6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ZFSin/spl/module/spl/spl-vnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -797,12 +797,14 @@ int vnode_put(vnode_t *vp)
// Re-test for idle, as we may have dropped lock for inactive
if ((vp->v_usecount == 0) && (vp->v_iocount == 0)) {
// Was it marked TERM, but we were waiting for last ref to leave.
#if 0
if ((vp->v_flags & VNODE_MARKTERM)) {
//vnode_recycle_int(vp, VNODE_LOCKED); //OldIrql is lost!
KeReleaseSpinLock(&vp->v_spinlock, OldIrql);
vnode_recycle_int(vp, 0); //OldIrql is lost!
return 0;
}
#endif
}

KeReleaseSpinLock(&vp->v_spinlock, OldIrql);
Expand All @@ -815,8 +817,8 @@ int vnode_recycle_int(vnode_t *vp, int flags)
ASSERT((vp->v_flags & VNODE_DEAD) == 0);
vp->v_flags |= VNODE_MARKTERM; // Mark it terminating

if (!(flags & VNODE_LOCKED))
KeAcquireSpinLock(&vp->v_spinlock, &OldIrql);
// if (!(flags & VNODE_LOCKED))
KeAcquireSpinLock(&vp->v_spinlock, &OldIrql);

// We will only reclaim idle nodes, and not mountpoints(ROOT)
if ((flags & FORCECLOSE) ||
Expand Down Expand Up @@ -898,7 +900,7 @@ void vnode_create(mount_t *mp, void *v_data, int type, int flags, struct vnode *
ExInitializeResourceLite((*vpp)->FileHeader.PagingIoResource);
ASSERT0(((uint64_t)(*vpp)->FileHeader.Resource) & 7);

#if 1
#if 0
// Release vnodes if needed
if (vnode_active >= vnode_max) {
uint64_t reclaims = 0;
Expand Down
5 changes: 5 additions & 0 deletions ZFSin/zfs/module/zfs/zfs_vnops_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,11 @@ int zfs_vnop_lookup(PIRP Irp, PIO_STACK_LOCATION IrpSp, mount_t *zmo)
int zfs_vnop_reclaim(struct vnode *vp)
{
znode_t *zp = VTOZ(vp);
if (zp == NULL) {
ASSERT("NULL zp in reclaim?");
return 0;
}

zfsvfs_t *zfsvfs = zp->z_zfsvfs;
boolean_t fastpath;

Expand Down

0 comments on commit 3b4eef6

Please sign in to comment.