From a78163127fd69f188fb1d0882f50f32b0b6657c3 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 18 Dec 2024 09:51:11 -0500 Subject: [PATCH] swap_pager: Transfer CHERI tags if the fast pass works This was a mismerge in commit 73c9044ae36b9b1cd5a219541c344f9d688438e6. --- sys/vm/swap_pager.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index cf4cb9983262..aed5e33fcf5f 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2393,12 +2393,12 @@ swp_pager_meta_transfer(vm_object_t srcobject, vm_object_t dstobject, swp_pager_meta_build(dstobject, sb->p + i - offset, sb->d[i], false); VM_OBJECT_WLOCK(srcobject); -#if __has_feature(capabilities) - swp_pager_cheri_xfer_tags(dstobject, - sb->p + i - offset, sb, i); -#endif } else if (blk != SWAPBLK_NONE) swp_pager_update_freerange(&range, sb->d[i]); +#if __has_feature(capabilities) + swp_pager_cheri_xfer_tags(dstobject, + sb->p + i - offset, sb, i); +#endif sb->d[i] = SWAPBLK_NONE; } pindex = sb->p + SWAP_META_PAGES;