svn commit: r281118 - head/sys/vm
Alan Cox
alc at FreeBSD.org
Sun Apr 5 20:07:34 UTC 2015
Author: alc
Date: Sun Apr 5 20:07:33 2015
New Revision: 281118
URL: https://svnweb.freebsd.org/changeset/base/281118
Log:
Until the lock assertions in vm_page_advise() are properly reevaluated,
vm_fault_dontneed() should acquire a write lock on the first object in
the shadow chain.
Reported by: gleb, David Wolfskill
Modified:
head/sys/vm/vm_fault.c
Modified: head/sys/vm/vm_fault.c
==============================================================================
--- head/sys/vm/vm_fault.c Sun Apr 5 18:57:58 2015 (r281117)
+++ head/sys/vm/vm_fault.c Sun Apr 5 20:07:33 2015 (r281118)
@@ -1060,9 +1060,9 @@ vm_fault_dontneed(const struct faultstat
VM_OBJECT_ASSERT_WLOCKED(object);
first_object = fs->first_object;
if (first_object != object) {
- if (!VM_OBJECT_TRYRLOCK(first_object)) {
+ if (!VM_OBJECT_TRYWLOCK(first_object)) {
VM_OBJECT_WUNLOCK(object);
- VM_OBJECT_RLOCK(first_object);
+ VM_OBJECT_WLOCK(first_object);
VM_OBJECT_WLOCK(object);
}
}
@@ -1097,7 +1097,7 @@ vm_fault_dontneed(const struct faultstat
}
}
if (first_object != object)
- VM_OBJECT_RUNLOCK(first_object);
+ VM_OBJECT_WUNLOCK(first_object);
}
/*
More information about the svn-src-all
mailing list