Remove unused function swap_pager_isswapped().
Noted by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
2ad9a5011e
commit
9680bb9877
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user