summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_object.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2014-02-21 09:43:34 +0000
committerattilio <attilio@FreeBSD.org>2014-02-21 09:43:34 +0000
commitcf0fa484f90ab986cb54e311aef02cbd8f18401a (patch)
tree336d1f49febc2c757f1df54ad5c5ce4d0219ce92 /sys/vm/vm_object.c
parent9f9257101a73a807f44a8b46452822dbab7305b0 (diff)
downloadFreeBSD-src-cf0fa484f90ab986cb54e311aef02cbd8f18401a.zip
FreeBSD-src-cf0fa484f90ab986cb54e311aef02cbd8f18401a.tar.gz
MFC r261867:
Use the right index to free swapspace after vm_page_rename().
Diffstat (limited to 'sys/vm/vm_object.c')
-rw-r--r--sys/vm/vm_object.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 8683e2f..6fbecc7 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -1628,9 +1628,11 @@ vm_object_backing_scan(vm_object_t object, int op)
p = TAILQ_FIRST(&backing_object->memq);
continue;
}
+
+ /* Use the old pindex to free the right page. */
if (backing_object->type == OBJT_SWAP)
- swap_pager_freespace(backing_object, p->pindex,
- 1);
+ swap_pager_freespace(backing_object,
+ new_pindex + backing_offset_index, 1);
#if VM_NRESERVLEVEL > 0
/*
OpenPOWER on IntegriCloud