Manually clear text references on reclaim for nullfs and tmpfs.
Both filesystems do no use vnode_pager_dealloc() which would handle this case otherwise. Nullfs because vnode vm_object handle never points to nullfs vnode. Tmpfs because its vm_object is never vnode object at all. Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
c5e7d75d31
commit
8f83653b3c
@ -810,6 +810,8 @@ null_reclaim(struct vop_reclaim_args *ap)
|
||||
*/
|
||||
if (vp->v_writecount > 0)
|
||||
VOP_ADD_WRITECOUNT(lowervp, -vp->v_writecount);
|
||||
else if (vp->v_writecount < 0)
|
||||
vp->v_writecount = 0;
|
||||
|
||||
VI_UNLOCK(vp);
|
||||
|
||||
|
@ -488,6 +488,8 @@ tmpfs_destroy_vobject(struct vnode *vp, vm_object_t obj)
|
||||
VI_LOCK(vp);
|
||||
vm_object_clear_flag(obj, OBJ_TMPFS);
|
||||
obj->un_pager.swp.swp_tmpfs = NULL;
|
||||
if (vp->v_writecount < 0)
|
||||
vp->v_writecount = 0;
|
||||
VI_UNLOCK(vp);
|
||||
VM_OBJECT_WUNLOCK(obj);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user