Date: Sun, 5 Apr 2015 20:07:34 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281118 - head/sys/vm Message-ID: <201504052007.t35K7YTx029895@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504052007.t35K7YTx029895>