get rid of extraneous header files
[unix-history] / usr / src / sys / vm / vm_swap.c
index 1240635..4543dae 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)vm_swap.c   7.2 (Berkeley) %G%
+ *     @(#)vm_swap.c   7.4 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -19,7 +19,6 @@
 #include "stat.h"
 #include "stat.h"
 
 #include "stat.h"
 #include "stat.h"
 
-struct buf rswbuf;
 /*
  * Indirect driver for multi-controller paging.
  */
 /*
  * Indirect driver for multi-controller paging.
  */
@@ -70,22 +69,6 @@ swstrategy(bp)
        (*bdevsw[major(bp->b_dev)].d_strategy)(bp);
 }
 
        (*bdevsw[major(bp->b_dev)].d_strategy)(bp);
 }
 
-swread(dev, uio)
-       dev_t dev;
-       struct uio *uio;
-{
-
-       return (physio(swstrategy, &rswbuf, dev, B_READ, minphys, uio));
-}
-
-swwrite(dev, uio)
-       dev_t dev;
-       struct uio *uio;
-{
-
-       return (physio(swstrategy, &rswbuf, dev, B_WRITE, minphys, uio));
-}
-
 /*
  * System call swapon(name) enables swapping on device name,
  * which must be in the swdevsw.  Return EBUSY
 /*
  * System call swapon(name) enables swapping on device name,
  * which must be in the swdevsw.  Return EBUSY
@@ -101,7 +84,7 @@ swapon()
        register struct swdevt *sp;
        register struct nameidata *ndp = &u.u_nd;
 
        register struct swdevt *sp;
        register struct nameidata *ndp = &u.u_nd;
 
-       if (!suser())
+       if (u.u_error = suser(u.u_cred, &u.u_acflag))
                return;
        ndp->ni_nameiop = LOOKUP | FOLLOW;
        ndp->ni_segflg = UIO_USERSPACE;
                return;
        ndp->ni_nameiop = LOOKUP | FOLLOW;
        ndp->ni_segflg = UIO_USERSPACE;