Back out uvm_is_swap_device().

This commit is contained in:
elad 2006-12-07 14:06:51 +00:00
parent 46a07fd83d
commit b8e4702fb2
3 changed files with 5 additions and 37 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: uvm.9,v 1.78 2006/12/01 16:06:09 elad Exp $
.\" $NetBSD: uvm.9,v 1.79 2006/12/07 14:06:51 elad Exp $
.\"
.\" Copyright (c) 1998 Matthew R. Green
.\" All rights reserved.
@ -26,7 +26,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd December 1, 2006
.Dd December 7, 2006
.Dt UVM 9
.Os
.Sh NAME
@ -916,10 +916,6 @@ and should match what was used for previous call to
.br
.Fn uvm_swap_stats "int cmd" "struct swapent *sep" "int sec" "register_t *retval" ;
.Pp
.Ft boolean_t
.br
.Fn uvm_is_swap_device "struct vnode *vp"
.Pp
The
.Fn uao_create ,
.Fn uao_detach ,
@ -1050,15 +1046,6 @@ entries in the array pointed by
On return,
.Fa retval
holds the actual number of entries copied in the array.
.Pp
.Fn uvm_is_swap_device
checks whether
.Fa vp
is used as a swap device, and returns
.Dv TRUE
if it is or
.Dv FALSE
if it isn't.
.Sh SYSCTL
UVM provides support for the
.Dv CTL_VM

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_extern.h,v 1.122 2006/12/01 16:06:09 elad Exp $ */
/* $NetBSD: uvm_extern.h,v 1.123 2006/12/07 14:06:51 elad Exp $ */
/*
*
@ -691,7 +691,6 @@ void uvm_pglistfree(struct pglist *);
/* uvm_swap.c */
void uvm_swap_init(void);
boolean_t uvm_is_swap_device(struct vnode *);
/* uvm_unix.c */
int uvm_grow(struct proc *, vaddr_t);

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvm_swap.c,v 1.114 2006/12/02 03:23:38 elad Exp $ */
/* $NetBSD: uvm_swap.c,v 1.115 2006/12/07 14:06:51 elad Exp $ */
/*
* Copyright (c) 1995, 1996, 1997 Matthew R. Green
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.114 2006/12/02 03:23:38 elad Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.115 2006/12/07 14:06:51 elad Exp $");
#include "fs_nfs.h"
#include "opt_uvmhist.h"
@ -372,24 +372,6 @@ swaplist_find(struct vnode *vp, boolean_t remove)
return (NULL);
}
/*
* provide an external function to check if a given vnode is used as a
* swap device.
*/
boolean_t
uvm_is_swap_device(struct vnode *vp)
{
boolean_t r;
lockmgr(&swap_syscall_lock, LK_EXCLUSIVE, NULL);
simple_lock(&uvm.swap_data_lock);
r = (swaplist_find(vp, 0) != NULL) ? TRUE : FALSE;
simple_unlock(&uvm.swap_data_lock);
lockmgr(&swap_syscall_lock, LK_RELEASE, NULL);
return (r);
}
/*
* swaplist_trim: scan priority list for empty priority entries and kill
* them.