diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2017-07-19 17:28:46 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2017-07-19 17:28:46 +0000 |
commit | 9680bb9877d2a99e654330fea3451392e3ef8796 (patch) | |
tree | dde6345a102fe3deb647ba3febade2eeca656a86 /sys/vm | |
parent | 2ad9a5011eb63102ed54f7f4e17843e5212cceb4 (diff) |
Remove unused function swap_pager_isswapped().
Noted by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=321217
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 d5f650ece9e3..c9f8cbfd2216 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); -} - int swap_pager_nswapdev(void) { diff --git a/sys/vm/swap_pager.h b/sys/vm/swap_pager.h index c72fa3d80b2b..6c170a4dec00 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_nswapdev(void); int swap_pager_reserve(vm_object_t, vm_pindex_t, vm_size_t); void swap_pager_status(int *total, int *used); |