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
5568e57d72
commit
3c93d22758
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=348698
@ -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…
Reference in New Issue
Block a user