svn commit: r321515 - stable/11/sys/vm
Konstantin Belousov
kib at FreeBSD.org
Wed Jul 26 07:00:29 UTC 2017
Author: kib
Date: Wed Jul 26 07:00:27 2017
New Revision: 321515
URL: https://svnweb.freebsd.org/changeset/base/321515
Log:
MFC r321217:
Remove unused function swap_pager_isswapped().
Modified:
stable/11/sys/vm/swap_pager.c
stable/11/sys/vm/swap_pager.h
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/vm/swap_pager.c
==============================================================================
--- stable/11/sys/vm/swap_pager.c Wed Jul 26 06:57:15 2017 (r321514)
+++ stable/11/sys/vm/swap_pager.c Wed Jul 26 07:00:27 2017 (r321515)
@@ -1585,43 +1585,6 @@ swp_pager_async_iodone(struct buf *bp)
}
/*
- * swap_pager_isswapped:
- *
- * Return 1 if at least one page in the given object is paged
- * out to the given swap device.
- *
- * This routine may not sleep.
- */
-int
-swap_pager_isswapped(vm_object_t object, struct swdevt *sp)
-{
- daddr_t index = 0;
- int bcount;
- int i;
-
- VM_OBJECT_ASSERT_WLOCKED(object);
- if (object->type != OBJT_SWAP)
- return (0);
-
- mtx_lock(&swhash_mtx);
- for (bcount = 0; bcount < object->un_pager.swp.swp_bcount; bcount++) {
- struct swblock *swap;
-
- if ((swap = *swp_pager_hash(object, index)) != NULL) {
- for (i = 0; i < SWAP_META_PAGES; ++i) {
- if (swp_pager_isondev(swap->swb_pages[i], sp)) {
- mtx_unlock(&swhash_mtx);
- return (1);
- }
- }
- }
- index += SWAP_META_PAGES;
- }
- mtx_unlock(&swhash_mtx);
- return (0);
-}
-
-/*
* SWP_PAGER_FORCE_PAGEIN() - force a swap block to be paged in
*
* This routine dissociates the page at the given index within an object
Modified: stable/11/sys/vm/swap_pager.h
==============================================================================
--- stable/11/sys/vm/swap_pager.h Wed Jul 26 06:57:15 2017 (r321514)
+++ stable/11/sys/vm/swap_pager.h Wed Jul 26 07:00:27 2017 (r321515)
@@ -82,7 +82,6 @@ void swap_pager_copy(vm_object_t, vm_object_t, vm_pind
vm_pindex_t swap_pager_find_least(vm_object_t object, vm_pindex_t pindex);
void swap_pager_freespace(vm_object_t, vm_pindex_t, vm_size_t);
void swap_pager_swap_init(void);
-int swap_pager_isswapped(vm_object_t, struct swdevt *);
int swap_pager_reserve(vm_object_t, vm_pindex_t, vm_size_t);
void swap_pager_status(int *total, int *used);
void swapoff_all(void);
More information about the svn-src-stable-11
mailing list