diff options
author | kib <kib@FreeBSD.org> | 2017-07-26 07:00:27 +0000 |
---|---|---|
committer | Luiz Souza <luiz@netgate.com> | 2018-02-21 15:16:55 -0300 |
commit | 522b83a1d712abdd903c5dbc701b04415c1342e7 (patch) | |
tree | 6890f06f5212cc3fd673604a38c79bd3af408c8d /sys/vm | |
parent | 7e17854953e8d13935cde45634bfc58914e4c118 (diff) | |
download | FreeBSD-src-522b83a1d712abdd903c5dbc701b04415c1342e7.zip FreeBSD-src-522b83a1d712abdd903c5dbc701b04415c1342e7.tar.gz |
MFC r321217:
Remove unused function swap_pager_isswapped().
(cherry picked from commit c6e718d6cb8b7c73f74c2910fc47637f436573d2)
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/swap_pager.c | 37 | ||||
-rw-r--r-- | sys/vm/swap_pager.h | 1 |
2 files changed, 0 insertions, 38 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 7e66549..f5a766b 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -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 diff --git a/sys/vm/swap_pager.h b/sys/vm/swap_pager.h index 83567f4..0131297 100644 --- a/sys/vm/swap_pager.h +++ b/sys/vm/swap_pager.h @@ -82,7 +82,6 @@ void swap_pager_copy(vm_object_t, vm_object_t, vm_pindex_t, int); 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); |