Date: Thu, 28 Dec 2017 22:56:31 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327316 - head/sys/vm Message-ID: <201712282256.vBSMuVpr062844@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Thu Dec 28 22:56:30 2017 New Revision: 327316 URL: https://svnweb.freebsd.org/changeset/base/327316 Log: In vm_swapout_map_deactivate_pages(), it is enough to lock the map for read. Reviewed by: alc, markj (as part of the larger patch) Tested by: pho (again, as part of the larger patch) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D13671 Modified: head/sys/vm/vm_swapout.c Modified: head/sys/vm/vm_swapout.c ============================================================================== --- head/sys/vm/vm_swapout.c Thu Dec 28 22:03:08 2017 (r327315) +++ head/sys/vm/vm_swapout.c Thu Dec 28 22:56:30 2017 (r327316) @@ -263,7 +263,7 @@ vm_swapout_map_deactivate_pages(vm_map_t map, long des vm_object_t obj, bigobj; int nothingwired; - if (!vm_map_trylock(map)) + if (!vm_map_trylock_read(map)) return; bigobj = NULL; @@ -327,7 +327,7 @@ vm_swapout_map_deactivate_pages(vm_map_t map, long des vm_map_max(map)); } - vm_map_unlock(map); + vm_map_unlock_read(map); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712282256.vBSMuVpr062844>