Author: kib Date: Tue Oct 3 11:00:34 2017 New Revision: 324235 URL: https://svnweb.freebsd.org/changeset/base/324235
Log: MFC r323768: For unlinked files, do not msync(2) or sync on the vnode deactivation. Modified: stable/11/sys/kern/vfs_subr.c stable/11/sys/vm/vm_object.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_subr.c ============================================================================== --- stable/11/sys/kern/vfs_subr.c Tue Oct 3 08:29:46 2017 (r324234) +++ stable/11/sys/kern/vfs_subr.c Tue Oct 3 11:00:34 2017 (r324235) @@ -2953,8 +2953,8 @@ vinactive(struct vnode *vp, struct thread *td) * point that VOP_INACTIVE() is called, there could still be * pending I/O and dirty pages in the object. */ - obj = vp->v_object; - if (obj != NULL && (obj->flags & OBJ_MIGHTBEDIRTY) != 0) { + if ((obj = vp->v_object) != NULL && (vp->v_vflag & VV_NOSYNC) == 0 && + (obj->flags & OBJ_MIGHTBEDIRTY) != 0) { VM_OBJECT_WLOCK(obj); vm_object_page_clean(obj, 0, 0, 0); VM_OBJECT_WUNLOCK(obj); Modified: stable/11/sys/vm/vm_object.c ============================================================================== --- stable/11/sys/vm/vm_object.c Tue Oct 3 08:29:46 2017 (r324234) +++ stable/11/sys/vm/vm_object.c Tue Oct 3 11:00:34 2017 (r324235) @@ -1083,8 +1083,8 @@ vm_object_sync(vm_object_t object, vm_ooffset_t offset * I/O. */ if (object->type == OBJT_VNODE && - (object->flags & OBJ_MIGHTBEDIRTY) != 0) { - vp = object->handle; + (object->flags & OBJ_MIGHTBEDIRTY) != 0 && + ((vp = object->handle)->v_vflag & VV_NOSYNC) == 0) { VM_OBJECT_WUNLOCK(object); (void) vn_start_write(vp, &mp, V_WAIT); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"