Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jan 2018 11:44:58 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r327546 - stable/11/sys/vm
Message-ID:  <201801041144.w04BiwC8038179@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Thu Jan  4 11:44:58 2018
New Revision: 327546
URL: https://svnweb.freebsd.org/changeset/base/327546

Log:
  MFC r327316:
  In vm_swapout_map_deactivate_pages(), it is enough to lock the map for read.

Modified:
  stable/11/sys/vm/vm_swapout.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/vm/vm_swapout.c
==============================================================================
--- stable/11/sys/vm/vm_swapout.c	Thu Jan  4 11:43:42 2018	(r327545)
+++ stable/11/sys/vm/vm_swapout.c	Thu Jan  4 11:44:58 2018	(r327546)
@@ -261,7 +261,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;
@@ -325,7 +325,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?201801041144.w04BiwC8038179>