diff options
| author | enami <enami@NetBSD.org> | 2001-12-16 04:51:34 +0000 |
|---|---|---|
| committer | enami <enami@NetBSD.org> | 2001-12-16 04:51:34 +0000 |
| commit | d3efa85632101fe212df403f36a6f36724bdfcbc (patch) | |
| tree | 76e34e65d54690214aea0b11e0ec25f7a2d59ef2 /sys/uvm | |
| parent | c17876b1d2dd0f1ff8e5c92cae5e11f4167ae3db (diff) | |
G/C no longer used saved credential for file i/o.
Diffstat (limited to 'sys/uvm')
| -rw-r--r-- | sys/uvm/uvm_swap.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/sys/uvm/uvm_swap.c b/sys/uvm/uvm_swap.c index 271c868241d..c15c6ba35eb 100644 --- a/sys/uvm/uvm_swap.c +++ b/sys/uvm/uvm_swap.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_swap.c,v 1.57 2001/11/10 07:37:01 lukem Exp $ */ +/* $NetBSD: uvm_swap.c,v 1.58 2001/12/16 04:51:34 enami 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.57 2001/11/10 07:37:01 lukem Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.58 2001/12/16 04:51:34 enami Exp $"); #include "fs_nfs.h" #include "opt_uvmhist.h" @@ -98,7 +98,6 @@ __KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.57 2001/11/10 07:37:01 lukem Exp $"); * - block size * - max byte count in buffer * - buffer - * - credentials to use when doing i/o to file * * userland controls and configures swap with the swapctl(2) system call. * the sys_swapctl performs the following operations: @@ -142,7 +141,6 @@ struct swapdev { int swd_maxactive; /* max active i/o reqs */ struct buf_queue swd_tab; /* buffer list */ int swd_active; /* number of active buffers */ - struct ucred *swd_cred; /* cred for file access */ }; /* @@ -653,13 +651,6 @@ sys_swapctl(p, v, retval) sdp->swd_dev = (vp->v_type == VBLK) ? vp->v_rdev : NODEV; BUFQ_INIT(&sdp->swd_tab); - /* - * XXX Is NFS elaboration necessary? - */ - if (vp->v_type == VREG) { - sdp->swd_cred = crdup(p->p_ucred); - } - swaplist_insert(sdp, spp, priority); simple_unlock(&uvm.swap_data_lock); @@ -680,9 +671,6 @@ sys_swapctl(p, v, retval) (void) swaplist_find(vp, 1); /* kill fake entry */ swaplist_trim(); simple_unlock(&uvm.swap_data_lock); - if (vp->v_type == VREG) { - crfree(sdp->swd_cred); - } free(sdp->swd_path, M_VMSWAP); free(sdp, M_VMSWAP); break; @@ -985,13 +973,10 @@ swap_off(p, sdp) KASSERT(sdp->swd_npginuse == sdp->swd_npgbad); /* - * done with the vnode and saved creds. + * done with the vnode. * drop our ref on the vnode before calling VOP_CLOSE() * so that spec_close() can tell if this is the last close. */ - if (sdp->swd_vp->v_type == VREG) { - crfree(sdp->swd_cred); - } vrele(sdp->swd_vp); if (sdp->swd_vp != rootvp) { (void) VOP_CLOSE(sdp->swd_vp, FREAD|FWRITE, p->p_ucred, p); |
