diff options
author | attilio <attilio@FreeBSD.org> | 2014-02-14 03:34:12 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2014-02-14 03:34:12 +0000 |
commit | 6a31e25bb9ba7753c520376761ebc2bab5410a26 (patch) | |
tree | 9d1b74dd3ae6eed80aee83e736d29f7790257b26 /sys/vm | |
parent | c184a50f0468eb4be80623c7511208e4be305b94 (diff) | |
download | FreeBSD-src-6a31e25bb9ba7753c520376761ebc2bab5410a26.zip FreeBSD-src-6a31e25bb9ba7753c520376761ebc2bab5410a26.tar.gz |
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
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_object.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index a13d37d..1c463ea 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 /* |