summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2004-09-24 16:04:20 +0000
committerdas <das@FreeBSD.org>2004-09-24 16:04:20 +0000
commit2e3453ac225b84d2153ab5eeee1db3f69d527b27 (patch)
treec0d3d03c73faef4e996ff3b9984f8cc77ad25a44 /sys/vm
parent089eb092e9d7eaaf8bab048009ef699039dcf6b7 (diff)
downloadFreeBSD-src-2e3453ac225b84d2153ab5eeee1db3f69d527b27.zip
FreeBSD-src-2e3453ac225b84d2153ab5eeee1db3f69d527b27.tar.gz
Don't look for swap blocks in objects that aren't swap-backed.
I expect that this will fix the following panic, reported by Jun: swap_pager_isswapped: failed to locate all swap meta blocks MT5 candidate
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/swap_pager.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c
index c3e3fc6..4199289 100644
--- a/sys/vm/swap_pager.c
+++ b/sys/vm/swap_pager.c
@@ -1595,6 +1595,9 @@ swap_pager_isswapped(vm_object_t object, struct swdevt *sp)
int i;
VM_OBJECT_LOCK_ASSERT(object, MA_OWNED);
+ if (object->type != OBJT_SWAP)
+ return (0);
+
for (bcount = 0; bcount < object->un_pager.swp.swp_bcount; bcount++) {
struct swblock *swap;
OpenPOWER on IntegriCloud