aboutsummaryrefslogtreecommitdiff
path: root/sys/vm
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2014-02-14 03:34:12 +0000
committerAttilio Rao <attilio@FreeBSD.org>2014-02-14 03:34:12 +0000
commit14a5dc17808ca2642dac9d987b79f594b8ef8a21 (patch)
tree9d1b74dd3ae6eed80aee83e736d29f7790257b26 /sys/vm
parenta999ce6abfea56e1b8a31d0015f9cfb2185b383a (diff)
downloadsrc-14a5dc17808ca2642dac9d987b79f594b8ef8a21.tar.gz
src-14a5dc17808ca2642dac9d987b79f594b8ef8a21.zip
Fix-up r254141: in the process of making a failing vm_page_rename()
a call of pager_swap_freespace() was moved around, now leading to freeing the incorrect page because of the pindex changes after vm_page_rename(). Get back to use the correct pindex when destroying the swap space. Sponsored by: EMC / Isilon storage division Reported by: avg Tested by: pho MFC after: 7 days
Notes
Notes: svn path=/head/; revision=261867
Diffstat (limited to 'sys/vm')
-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 a13d37d8cafe..1c463ea492ad 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -1627,9 +1627,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
/*