Author: alc Date: Sat May 21 23:18:23 2016 New Revision: 300382 URL: https://svnweb.freebsd.org/changeset/base/300382
Log: When descending a shadow chain of objects, it makes no sense to update the current offset (spelled: "fs.pindex") until it is known whether a backing object exists. In fact, if not for the fact that the backing object offset is zero when there is no backing object, this update would produce a broken offset. Reviewed by: kib Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Sat May 21 23:14:27 2016 (r300381) +++ head/sys/vm/vm_fault.c Sat May 21 23:18:23 2016 (r300382) @@ -705,7 +705,6 @@ vnode_locked: * Move on to the next object. Lock the next object before * unlocking the current one. */ - fs.pindex += OFF_TO_IDX(fs.object->backing_object_offset); next_object = fs.object->backing_object; if (next_object == NULL) { /* @@ -743,6 +742,8 @@ vnode_locked: vm_object_pip_add(next_object, 1); if (fs.object != fs.first_object) vm_object_pip_wakeup(fs.object); + fs.pindex += + OFF_TO_IDX(fs.object->backing_object_offset); VM_OBJECT_WUNLOCK(fs.object); fs.object = next_object; } _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"