Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Feb 2019 15:44:33 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r344440 - head/sys/vm
Message-ID:  <201902211544.x1LFiXOf094848@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Thu Feb 21 15:44:32 2019
New Revision: 344440
URL: https://svnweb.freebsd.org/changeset/base/344440

Log:
  Clear pointers to indicate that the respective locks are released.
  
  This fixes a problem in r344231: vm_pageout_launder() may scan two
  queues when swap is disabled.
  
  Reported by:	pho
  MFC with:	r344231

Modified:
  head/sys/vm/vm_pageout.c

Modified: head/sys/vm/vm_pageout.c
==============================================================================
--- head/sys/vm/vm_pageout.c	Thu Feb 21 15:31:01 2019	(r344439)
+++ head/sys/vm/vm_pageout.c	Thu Feb 21 15:44:32 2019	(r344440)
@@ -893,10 +893,14 @@ free_page:
 			object = NULL;
 		}
 	}
-	if (mtx != NULL)
+	if (mtx != NULL) {
 		mtx_unlock(mtx);
-	if (object != NULL)
+		mtx = NULL;
+	}
+	if (object != NULL) {
 		VM_OBJECT_WUNLOCK(object);
+		object = NULL;
+	}
 	vm_pagequeue_lock(pq);
 	vm_pageout_end_scan(&ss);
 	vm_pagequeue_unlock(pq);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902211544.x1LFiXOf094848>