SCCS-vsn: sys/miscfs/fifofs/fifo_vnops.c 7.15
SCCS-vsn: sys/miscfs/specfs/spec_vnops.c 7.45
SCCS-vsn: sys/ufs/ffs/ufs_inode.c 7.47
SCCS-vsn: sys/ufs/ufs/ufs_inode.c 7.47
SCCS-vsn: sys/ufs/ffs/ffs_alloc.c 7.37
SCCS-vsn: sys/ufs/ffs/ffs_balloc.c 7.21
SCCS-vsn: sys/ufs/ffs/ffs_inode.c 7.53
SCCS-vsn: sys/ufs/ffs/ffs_vnops.c 7.79
SCCS-vsn: sys/ufs/mfs/mfs_vnops.c 7.33
SCCS-vsn: sys/ufs/lfs/lfs_bio.c 7.11
SCCS-vsn: sys/ufs/lfs/lfs_vnops.c 7.83
SCCS-vsn: sys/ufs/lfs/lfs_inode.c 7.66
12 files changed:
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)fifo_vnops.c 7.14 (Berkeley) %G%
+ * @(#)fifo_vnops.c 7.15 (Berkeley) %G%
USES_VOP_CLOSE;
USES_VOP_LOCK;
USES_VOP_UNLOCK;
USES_VOP_CLOSE;
USES_VOP_LOCK;
USES_VOP_UNLOCK;
+ register struct vnode *vp = ap->a_vp;
register struct fifoinfo *fip;
struct socket *rso, *wso;
int error;
register struct fifoinfo *fip;
struct socket *rso, *wso;
int error;
if ((ap->a_mode & (FREAD|FWRITE)) == (FREAD|FWRITE))
return (EINVAL);
if ((ap->a_mode & (FREAD|FWRITE)) == (FREAD|FWRITE))
return (EINVAL);
- if ((fip = ap->a_vp->v_fifoinfo) == NULL) {
+ if ((fip = vp->v_fifoinfo) == NULL) {
MALLOC(fip, struct fifoinfo *, sizeof(*fip), M_VNODE, M_WAITOK);
MALLOC(fip, struct fifoinfo *, sizeof(*fip), M_VNODE, M_WAITOK);
- ap->a_vp->v_fifoinfo = fip;
if (error = socreate(AF_UNIX, &rso, SOCK_STREAM, 0)) {
free(fip, M_VNODE);
if (error = socreate(AF_UNIX, &rso, SOCK_STREAM, 0)) {
free(fip, M_VNODE);
- ap->a_vp->v_fifoinfo = NULL;
return (error);
}
fip->fi_readsock = rso;
if (error = socreate(AF_UNIX, &wso, SOCK_STREAM, 0)) {
(void)soclose(rso);
free(fip, M_VNODE);
return (error);
}
fip->fi_readsock = rso;
if (error = socreate(AF_UNIX, &wso, SOCK_STREAM, 0)) {
(void)soclose(rso);
free(fip, M_VNODE);
- ap->a_vp->v_fifoinfo = NULL;
return (error);
}
fip->fi_writesock = wso;
return (error);
}
fip->fi_writesock = wso;
(void)soclose(wso);
(void)soclose(rso);
free(fip, M_VNODE);
(void)soclose(wso);
(void)soclose(rso);
free(fip, M_VNODE);
- ap->a_vp->v_fifoinfo = NULL;
return (error);
}
fip->fi_readers = fip->fi_writers = 0;
return (error);
}
fip->fi_readers = fip->fi_writers = 0;
if (ap->a_mode & O_NONBLOCK)
return (0);
while (fip->fi_writers == 0) {
if (ap->a_mode & O_NONBLOCK)
return (0);
while (fip->fi_writers == 0) {
error = tsleep((caddr_t)&fip->fi_readers, PSOCK,
openstr, 0);
error = tsleep((caddr_t)&fip->fi_readers, PSOCK,
openstr, 0);
wakeup((caddr_t)&fip->fi_readers);
}
while (fip->fi_readers == 0) {
wakeup((caddr_t)&fip->fi_readers);
}
while (fip->fi_readers == 0) {
error = tsleep((caddr_t)&fip->fi_writers,
PSOCK, openstr, 0);
error = tsleep((caddr_t)&fip->fi_writers,
PSOCK, openstr, 0);
if (error)
break;
}
}
}
if (error)
if (error)
break;
}
}
}
if (error)
- VOP_CLOSE(ap->a_vp, ap->a_mode, ap->a_cred, ap->a_p);
+ VOP_CLOSE(vp, ap->a_mode, ap->a_cred, ap->a_p);
{
USES_VOP_LOCK;
USES_VOP_UNLOCK;
{
USES_VOP_LOCK;
USES_VOP_UNLOCK;
+ register struct uio *uio = ap->a_uio;
register struct socket *rso = ap->a_vp->v_fifoinfo->fi_readsock;
int error, startresid;
#ifdef DIAGNOSTIC
register struct socket *rso = ap->a_vp->v_fifoinfo->fi_readsock;
int error, startresid;
#ifdef DIAGNOSTIC
- if (ap->a_uio->uio_rw != UIO_READ)
+ if (uio->uio_rw != UIO_READ)
panic("fifo_read mode");
#endif
panic("fifo_read mode");
#endif
- if (ap->a_uio->uio_resid == 0)
+ if (uio->uio_resid == 0)
return (0);
if (ap->a_ioflag & IO_NDELAY)
rso->so_state |= SS_NBIO;
return (0);
if (ap->a_ioflag & IO_NDELAY)
rso->so_state |= SS_NBIO;
- startresid = ap->a_uio->uio_resid;
+ startresid = uio->uio_resid;
- error = soreceive(rso, (struct mbuf **)0, ap->a_uio, (int *)0,
+ error = soreceive(rso, (struct mbuf **)0, uio, (int *)0,
(struct mbuf **)0, (struct mbuf **)0);
VOP_LOCK(ap->a_vp);
/*
* Clear EOF indication after first such return.
*/
(struct mbuf **)0, (struct mbuf **)0);
VOP_LOCK(ap->a_vp);
/*
* Clear EOF indication after first such return.
*/
- if (ap->a_uio->uio_resid == startresid)
+ if (uio->uio_resid == startresid)
rso->so_state &= ~SS_CANTRCVMORE;
if (ap->a_ioflag & IO_NDELAY)
rso->so_state &= ~SS_NBIO;
rso->so_state &= ~SS_CANTRCVMORE;
if (ap->a_ioflag & IO_NDELAY)
rso->so_state &= ~SS_NBIO;
fifo_close (ap)
struct vop_close_args *ap;
{
fifo_close (ap)
struct vop_close_args *ap;
{
- register struct fifoinfo *fip = ap->a_vp->v_fifoinfo;
+ register struct vnode *vp = ap->a_vp;
+ register struct fifoinfo *fip = vp->v_fifoinfo;
int error1, error2;
if (ap->a_fflag & FWRITE) {
int error1, error2;
if (ap->a_fflag & FWRITE) {
if (fip->fi_readers == 0)
socantsendmore(fip->fi_writesock);
}
if (fip->fi_readers == 0)
socantsendmore(fip->fi_writesock);
}
- if (ap->a_vp->v_usecount > 1)
+ if (vp->v_usecount > 1)
return (0);
error1 = soclose(fip->fi_readsock);
error2 = soclose(fip->fi_writesock);
FREE(fip, M_VNODE);
return (0);
error1 = soclose(fip->fi_readsock);
error2 = soclose(fip->fi_writesock);
FREE(fip, M_VNODE);
- ap->a_vp->v_fifoinfo = NULL;
if (error1)
return (error1);
return (error2);
if (error1)
return (error1);
return (error2);
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)spec_vnops.c 7.44 (Berkeley) %G%
+ * @(#)spec_vnops.c 7.45 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
{
USES_VOP_LOCK;
USES_VOP_UNLOCK;
{
USES_VOP_LOCK;
USES_VOP_UNLOCK;
- dev_t dev = (dev_t)ap->a_vp->v_rdev;
+ register struct vnode *vp = ap->a_vp;
+ dev_t dev = (dev_t)vp->v_rdev;
register int maj = major(dev);
int error;
register int maj = major(dev);
int error;
- if (ap->a_vp->v_mount && (ap->a_vp->v_mount->mnt_flag & MNT_NODEV))
+ if (vp->v_mount && (vp->v_mount->mnt_flag & MNT_NODEV))
- switch (ap->a_vp->v_type) {
case VCHR:
if ((u_int)maj >= nchrdev)
return (ENXIO);
case VCHR:
if ((u_int)maj >= nchrdev)
return (ENXIO);
error = (*cdevsw[maj].d_open)(dev, ap->a_mode, S_IFCHR, ap->a_p);
error = (*cdevsw[maj].d_open)(dev, ap->a_mode, S_IFCHR, ap->a_p);
return (error);
case VBLK:
if ((u_int)maj >= nblkdev)
return (ENXIO);
return (error);
case VBLK:
if ((u_int)maj >= nblkdev)
return (ENXIO);
- if (error = ufs_mountedon(ap->a_vp))
+ if (error = ufs_mountedon(vp))
return (error);
return ((*bdevsw[maj].d_open)(dev, ap->a_mode, S_IFBLK, ap->a_p));
}
return (error);
return ((*bdevsw[maj].d_open)(dev, ap->a_mode, S_IFBLK, ap->a_p));
}
{
USES_VOP_LOCK;
USES_VOP_UNLOCK;
{
USES_VOP_LOCK;
USES_VOP_UNLOCK;
- struct proc *p = ap->a_uio->uio_procp;
+ register struct vnode *vp = ap->a_vp;
+ register struct uio *uio = ap->a_uio;
+ struct proc *p = uio->uio_procp;
struct buf *bp;
daddr_t bn, nextbn;
long bsize, bscale;
struct buf *bp;
daddr_t bn, nextbn;
long bsize, bscale;
int error = 0;
#ifdef DIAGNOSTIC
int error = 0;
#ifdef DIAGNOSTIC
- if (ap->a_uio->uio_rw != UIO_READ)
+ if (uio->uio_rw != UIO_READ)
- if (ap->a_uio->uio_segflg == UIO_USERSPACE && ap->a_uio->uio_procp != curproc)
+ if (uio->uio_segflg == UIO_USERSPACE && uio->uio_procp != curproc)
panic("spec_read proc");
#endif
panic("spec_read proc");
#endif
- if (ap->a_uio->uio_resid == 0)
+ if (uio->uio_resid == 0)
- switch (ap->a_vp->v_type) {
- VOP_UNLOCK(ap->a_vp);
- error = (*cdevsw[major(ap->a_vp->v_rdev)].d_read)
- (ap->a_vp->v_rdev, ap->a_uio, ap->a_ioflag);
- VOP_LOCK(ap->a_vp);
+ VOP_UNLOCK(vp);
+ error = (*cdevsw[major(vp->v_rdev)].d_read)
+ (vp->v_rdev, uio, ap->a_ioflag);
+ VOP_LOCK(vp);
return (error);
case VBLK:
return (error);
case VBLK:
- if (ap->a_uio->uio_offset < 0)
+ if (uio->uio_offset < 0)
return (EINVAL);
bsize = BLKDEV_IOSIZE;
return (EINVAL);
bsize = BLKDEV_IOSIZE;
- if ((*bdevsw[major(ap->a_vp->v_rdev)].d_ioctl)(ap->a_vp->v_rdev, DIOCGPART,
+ if ((*bdevsw[major(vp->v_rdev)].d_ioctl)(vp->v_rdev, DIOCGPART,
(caddr_t)&dpart, FREAD, p) == 0) {
if (dpart.part->p_fstype == FS_BSDFFS &&
dpart.part->p_frag != 0 && dpart.part->p_fsize != 0)
(caddr_t)&dpart, FREAD, p) == 0) {
if (dpart.part->p_fstype == FS_BSDFFS &&
dpart.part->p_frag != 0 && dpart.part->p_fsize != 0)
}
bscale = bsize / DEV_BSIZE;
do {
}
bscale = bsize / DEV_BSIZE;
do {
- bn = (ap->a_uio->uio_offset / DEV_BSIZE) &~ (bscale - 1);
- on = ap->a_uio->uio_offset % bsize;
- n = MIN((unsigned)(bsize - on), ap->a_uio->uio_resid);
- if (ap->a_vp->v_lastr + bscale == bn) {
+ bn = (uio->uio_offset / DEV_BSIZE) &~ (bscale - 1);
+ on = uio->uio_offset % bsize;
+ n = MIN((unsigned)(bsize - on), uio->uio_resid);
+ if (vp->v_lastr + bscale == bn) {
- error = breadn(ap->a_vp, bn, (int)bsize, &nextbn,
+ error = breadn(vp, bn, (int)bsize, &nextbn,
(int *)&bsize, 1, NOCRED, &bp);
} else
(int *)&bsize, 1, NOCRED, &bp);
} else
- error = bread(ap->a_vp, bn, (int)bsize, NOCRED, &bp);
- ap->a_vp->v_lastr = bn;
+ error = bread(vp, bn, (int)bsize, NOCRED, &bp);
+ vp->v_lastr = bn;
n = MIN(n, bsize - bp->b_resid);
if (error) {
brelse(bp);
return (error);
}
n = MIN(n, bsize - bp->b_resid);
if (error) {
brelse(bp);
return (error);
}
- error = uiomove(bp->b_un.b_addr + on, n, ap->a_uio);
+ error = uiomove(bp->b_un.b_addr + on, n, uio);
if (n + on == bsize)
bp->b_flags |= B_AGE;
brelse(bp);
if (n + on == bsize)
bp->b_flags |= B_AGE;
brelse(bp);
- } while (error == 0 && ap->a_uio->uio_resid > 0 && n != 0);
+ } while (error == 0 && uio->uio_resid > 0 && n != 0);
{
USES_VOP_LOCK;
USES_VOP_UNLOCK;
{
USES_VOP_LOCK;
USES_VOP_UNLOCK;
- struct proc *p = ap->a_uio->uio_procp;
+ register struct vnode *vp = ap->a_vp;
+ register struct uio *uio = ap->a_uio;
+ struct proc *p = uio->uio_procp;
struct buf *bp;
daddr_t bn;
int bsize, blkmask;
struct buf *bp;
daddr_t bn;
int bsize, blkmask;
int error = 0;
#ifdef DIAGNOSTIC
int error = 0;
#ifdef DIAGNOSTIC
- if (ap->a_uio->uio_rw != UIO_WRITE)
+ if (uio->uio_rw != UIO_WRITE)
panic("spec_write mode");
panic("spec_write mode");
- if (ap->a_uio->uio_segflg == UIO_USERSPACE && ap->a_uio->uio_procp != curproc)
+ if (uio->uio_segflg == UIO_USERSPACE && uio->uio_procp != curproc)
panic("spec_write proc");
#endif
panic("spec_write proc");
#endif
- switch (ap->a_vp->v_type) {
- VOP_UNLOCK(ap->a_vp);
- error = (*cdevsw[major(ap->a_vp->v_rdev)].d_write)
- (ap->a_vp->v_rdev, ap->a_uio, ap->a_ioflag);
- VOP_LOCK(ap->a_vp);
+ VOP_UNLOCK(vp);
+ error = (*cdevsw[major(vp->v_rdev)].d_write)
+ (vp->v_rdev, uio, ap->a_ioflag);
+ VOP_LOCK(vp);
return (error);
case VBLK:
return (error);
case VBLK:
- if (ap->a_uio->uio_resid == 0)
+ if (uio->uio_resid == 0)
- if (ap->a_uio->uio_offset < 0)
+ if (uio->uio_offset < 0)
return (EINVAL);
bsize = BLKDEV_IOSIZE;
return (EINVAL);
bsize = BLKDEV_IOSIZE;
- if ((*bdevsw[major(ap->a_vp->v_rdev)].d_ioctl)(ap->a_vp->v_rdev, DIOCGPART,
+ if ((*bdevsw[major(vp->v_rdev)].d_ioctl)(vp->v_rdev, DIOCGPART,
(caddr_t)&dpart, FREAD, p) == 0) {
if (dpart.part->p_fstype == FS_BSDFFS &&
dpart.part->p_frag != 0 && dpart.part->p_fsize != 0)
(caddr_t)&dpart, FREAD, p) == 0) {
if (dpart.part->p_fstype == FS_BSDFFS &&
dpart.part->p_frag != 0 && dpart.part->p_fsize != 0)
}
blkmask = (bsize / DEV_BSIZE) - 1;
do {
}
blkmask = (bsize / DEV_BSIZE) - 1;
do {
- bn = (ap->a_uio->uio_offset / DEV_BSIZE) &~ blkmask;
- on = ap->a_uio->uio_offset % bsize;
- n = MIN((unsigned)(bsize - on), ap->a_uio->uio_resid);
+ bn = (uio->uio_offset / DEV_BSIZE) &~ blkmask;
+ on = uio->uio_offset % bsize;
+ n = MIN((unsigned)(bsize - on), uio->uio_resid);
- bp = getblk(ap->a_vp, bn, bsize);
+ bp = getblk(vp, bn, bsize);
- error = bread(ap->a_vp, bn, bsize, NOCRED, &bp);
+ error = bread(vp, bn, bsize, NOCRED, &bp);
n = MIN(n, bsize - bp->b_resid);
if (error) {
brelse(bp);
return (error);
}
n = MIN(n, bsize - bp->b_resid);
if (error) {
brelse(bp);
return (error);
}
- error = uiomove(bp->b_un.b_addr + on, n, ap->a_uio);
+ error = uiomove(bp->b_un.b_addr + on, n, uio);
if (n + on == bsize) {
bp->b_flags |= B_AGE;
bawrite(bp);
} else
bdwrite(bp);
if (n + on == bsize) {
bp->b_flags |= B_AGE;
bawrite(bp);
} else
bdwrite(bp);
- } while (error == 0 && ap->a_uio->uio_resid > 0 && n != 0);
+ } while (error == 0 && uio->uio_resid > 0 && n != 0);
spec_close (ap)
struct vop_close_args *ap;
{
spec_close (ap)
struct vop_close_args *ap;
{
- dev_t dev = ap->a_vp->v_rdev;
+ register struct vnode *vp = ap->a_vp;
+ dev_t dev = vp->v_rdev;
int (*devclose) __P((dev_t, int, int, struct proc *));
int mode;
int (*devclose) __P((dev_t, int, int, struct proc *));
int mode;
- switch (ap->a_vp->v_type) {
* of forcably closing the device, otherwise we only
* close on last reference.
*/
* of forcably closing the device, otherwise we only
* close on last reference.
*/
- if (vcount(ap->a_vp) > 1 && (ap->a_vp->v_flag & VXLOCK) == 0)
+ if (vcount(vp) > 1 && (vp->v_flag & VXLOCK) == 0)
return (0);
devclose = cdevsw[major(dev)].d_close;
mode = S_IFCHR;
return (0);
devclose = cdevsw[major(dev)].d_close;
mode = S_IFCHR;
* we must invalidate any in core blocks, so that
* we can, for instance, change floppy disks.
*/
* we must invalidate any in core blocks, so that
* we can, for instance, change floppy disks.
*/
- vflushbuf(ap->a_vp, 0);
- if (vinvalbuf(ap->a_vp, 1))
+ vflushbuf(vp, 0);
+ if (vinvalbuf(vp, 1))
return (0);
/*
* We do not want to really close the device if it
return (0);
/*
* We do not want to really close the device if it
* sum of the reference counts on all the aliased
* vnodes descends to one, we are on last close.
*/
* sum of the reference counts on all the aliased
* vnodes descends to one, we are on last close.
*/
- if (vcount(ap->a_vp) > 1 && (ap->a_vp->v_flag & VXLOCK) == 0)
+ if (vcount(vp) > 1 && (vp->v_flag & VXLOCK) == 0)
return (0);
devclose = bdevsw[major(dev)].d_close;
mode = S_IFBLK;
return (0);
devclose = bdevsw[major(dev)].d_close;
mode = S_IFBLK;
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ffs_alloc.c 7.36 (Berkeley) %G%
+ * @(#)ffs_alloc.c 7.37 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
{
USES_VOP_VFREE;
USES_VOP_VGET;
{
USES_VOP_VFREE;
USES_VOP_VGET;
+ register struct vnode *pvp = ap->a_pvp;
register struct inode *pip;
register struct fs *fs;
register struct inode *ip;
register struct inode *pip;
register struct fs *fs;
register struct inode *ip;
int cg, error;
*ap->a_vpp = NULL;
int cg, error;
*ap->a_vpp = NULL;
fs = pip->i_fs;
if (fs->fs_cstotal.cs_nifree == 0)
goto noinodes;
fs = pip->i_fs;
if (fs->fs_cstotal.cs_nifree == 0)
goto noinodes;
ino = (ino_t)ffs_hashalloc(pip, cg, (long)ipref, ap->a_mode, ffs_ialloccg);
if (ino == 0)
goto noinodes;
ino = (ino_t)ffs_hashalloc(pip, cg, (long)ipref, ap->a_mode, ffs_ialloccg);
if (ino == 0)
goto noinodes;
- error = FFS_VGET(ap->a_pvp->v_mount, ino, ap->a_vpp);
+ error = FFS_VGET(pvp->v_mount, ino, ap->a_vpp);
- VOP_VFREE(ap->a_pvp, ino, ap->a_mode);
+ VOP_VFREE(pvp, ino, ap->a_mode);
return (error);
}
ip = VTOI(*ap->a_vpp);
return (error);
}
ip = VTOI(*ap->a_vpp);
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ffs_balloc.c 7.20 (Berkeley) %G%
+ * @(#)ffs_balloc.c 7.21 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
ffs_bmap (ap)
struct vop_bmap_args *ap;
{
ffs_bmap (ap)
struct vop_bmap_args *ap;
{
+ register daddr_t bn = ap->a_bn;
register struct inode *ip;
register struct fs *fs;
register daddr_t nb;
register struct inode *ip;
register struct fs *fs;
register daddr_t nb;
*ap->a_vpp = ip->i_devvp;
if (ap->a_bnp == NULL)
return (0);
*ap->a_vpp = ip->i_devvp;
if (ap->a_bnp == NULL)
return (0);
return (EFBIG);
fs = ip->i_fs;
/*
* The first NDADDR blocks are direct blocks
*/
return (EFBIG);
fs = ip->i_fs;
/*
* The first NDADDR blocks are direct blocks
*/
- if (ap->a_bn < NDADDR) {
- nb = ip->i_db[ap->a_bn];
+ if (bn < NDADDR) {
+ nb = ip->i_db[bn];
if (nb == 0) {
*ap->a_bnp = (daddr_t)-1;
return (0);
if (nb == 0) {
*ap->a_bnp = (daddr_t)-1;
return (0);
* Determine the number of levels of indirection.
*/
sh = 1;
* Determine the number of levels of indirection.
*/
sh = 1;
for (j = NIADDR; j > 0; j--) {
sh *= NINDIR(fs);
for (j = NIADDR; j > 0; j--) {
sh *= NINDIR(fs);
}
if (j == 0)
return (EFBIG);
}
if (j == 0)
return (EFBIG);
}
bap = bp->b_un.b_daddr;
sh /= NINDIR(fs);
}
bap = bp->b_un.b_daddr;
sh /= NINDIR(fs);
- i = (ap->a_bn / sh) % NINDIR(fs);
+ i = (bn / sh) % NINDIR(fs);
nb = bap[i];
if (nb == 0) {
*ap->a_bnp = (daddr_t)-1;
nb = bap[i];
if (nb == 0) {
*ap->a_bnp = (daddr_t)-1;
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ffs_inode.c 7.52 (Berkeley) %G%
+ * @(#)ffs_inode.c 7.53 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
struct vop_truncate_args *ap;
{
USES_VOP_UPDATE;
struct vop_truncate_args *ap;
{
USES_VOP_UPDATE;
+ register struct vnode *ovp = ap->a_vp;
register daddr_t lastblock;
register struct inode *oip;
daddr_t bn, lbn, lastiblock[NIADDR];
register daddr_t lastblock;
register struct inode *oip;
daddr_t bn, lbn, lastiblock[NIADDR];
struct inode tip;
off_t osize;
struct inode tip;
off_t osize;
- vnode_pager_setsize(ap->a_vp, (u_long)ap->a_length);
- oip = VTOI(ap->a_vp);
+ vnode_pager_setsize(ovp, (u_long)ap->a_length);
+ oip = VTOI(ovp);
if (oip->i_size <= ap->a_length) {
oip->i_flag |= ICHG|IUPD;
if (oip->i_size <= ap->a_length) {
oip->i_flag |= ICHG|IUPD;
- error = VOP_UPDATE(ap->a_vp, &time, &time, 1);
+ error = VOP_UPDATE(ovp, &time, &time, 1);
return (error);
oip->i_size = ap->a_length;
size = blksize(fs, oip, lbn);
return (error);
oip->i_size = ap->a_length;
size = blksize(fs, oip, lbn);
- (void) vnode_pager_uncache(ap->a_vp);
+ (void) vnode_pager_uncache(ovp);
bzero(bp->b_un.b_addr + offset, (unsigned)(size - offset));
allocbuf(bp, size);
if (ap->a_flags & IO_SYNC)
bzero(bp->b_un.b_addr + offset, (unsigned)(size - offset));
allocbuf(bp, size);
if (ap->a_flags & IO_SYNC)
for (i = NDADDR - 1; i > lastblock; i--)
oip->i_db[i] = 0;
oip->i_flag |= ICHG|IUPD;
for (i = NDADDR - 1; i > lastblock; i--)
oip->i_db[i] = 0;
oip->i_flag |= ICHG|IUPD;
- vinvalbuf(ap->a_vp, (ap->a_length > 0));
- allerror = VOP_UPDATE(ap->a_vp, &time, &time, MNT_WAIT);
+ vinvalbuf(ovp, (ap->a_length > 0));
+ allerror = VOP_UPDATE(ovp, &time, &time, MNT_WAIT);
/*
* Indirect blocks first.
/*
* Indirect blocks first.
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ffs_vnops.c 7.78 (Berkeley) %G%
+ * @(#)ffs_vnops.c 7.79 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
{
USES_VOP_TRUNCATE;
USES_VOP_UPDATE;
{
USES_VOP_TRUNCATE;
USES_VOP_UPDATE;
+ register struct vnode *vp = ap->a_vp;
struct proc *p = ap->a_uio->uio_procp;
struct proc *p = ap->a_uio->uio_procp;
- register struct inode *ip = VTOI(ap->a_vp);
+ register struct inode *ip = VTOI(vp);
register struct fs *fs;
struct buf *bp;
daddr_t lbn, bn;
register struct fs *fs;
struct buf *bp;
daddr_t lbn, bn;
if (ap->a_uio->uio_rw != UIO_WRITE)
panic("ffs_write mode");
#endif
if (ap->a_uio->uio_rw != UIO_WRITE)
panic("ffs_write mode");
#endif
- switch (ap->a_vp->v_type) {
case VREG:
if (ap->a_ioflag & IO_APPEND)
ap->a_uio->uio_offset = ip->i_size;
case VREG:
if (ap->a_ioflag & IO_APPEND)
ap->a_uio->uio_offset = ip->i_size;
* Maybe this should be above the vnode op call, but so long as
* file servers have no limits, i don't think it matters
*/
* Maybe this should be above the vnode op call, but so long as
* file servers have no limits, i don't think it matters
*/
- if (ap->a_vp->v_type == VREG && p &&
+ if (vp->v_type == VREG && p &&
ap->a_uio->uio_offset + ap->a_uio->uio_resid >
p->p_rlimit[RLIMIT_FSIZE].rlim_cur) {
psignal(p, SIGXFSZ);
ap->a_uio->uio_offset + ap->a_uio->uio_resid >
p->p_rlimit[RLIMIT_FSIZE].rlim_cur) {
psignal(p, SIGXFSZ);
bn = bp->b_blkno;
if (ap->a_uio->uio_offset + n > ip->i_size) {
ip->i_size = ap->a_uio->uio_offset + n;
bn = bp->b_blkno;
if (ap->a_uio->uio_offset + n > ip->i_size) {
ip->i_size = ap->a_uio->uio_offset + n;
- vnode_pager_setsize(ap->a_vp, (u_long)ip->i_size);
+ vnode_pager_setsize(vp, (u_long)ip->i_size);
}
size = blksize(fs, ip, lbn);
}
size = blksize(fs, ip, lbn);
- (void) vnode_pager_uncache(ap->a_vp);
+ (void) vnode_pager_uncache(vp);
n = MIN(n, size - bp->b_resid);
error = uiomove(bp->b_un.b_addr + on, n, ap->a_uio);
if (ap->a_ioflag & IO_SYNC)
n = MIN(n, size - bp->b_resid);
error = uiomove(bp->b_un.b_addr + on, n, ap->a_uio);
if (ap->a_ioflag & IO_SYNC)
ip->i_mode &= ~(ISUID|ISGID);
} while (error == 0 && ap->a_uio->uio_resid > 0 && n != 0);
if (error && (ap->a_ioflag & IO_UNIT)) {
ip->i_mode &= ~(ISUID|ISGID);
} while (error == 0 && ap->a_uio->uio_resid > 0 && n != 0);
if (error && (ap->a_ioflag & IO_UNIT)) {
- (void)VOP_TRUNCATE(ap->a_vp, osize, ap->a_ioflag & IO_SYNC, ap->a_cred);
+ (void)VOP_TRUNCATE(vp, osize, ap->a_ioflag & IO_SYNC, ap->a_cred);
ap->a_uio->uio_offset -= resid - ap->a_uio->uio_resid;
ap->a_uio->uio_resid = resid;
}
if (!error && (ap->a_ioflag & IO_SYNC))
ap->a_uio->uio_offset -= resid - ap->a_uio->uio_resid;
ap->a_uio->uio_resid = resid;
}
if (!error && (ap->a_ioflag & IO_SYNC))
- error = VOP_UPDATE(ap->a_vp, &time, &time, 1);
+ error = VOP_UPDATE(vp, &time, &time, 1);
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ufs_inode.c 7.46 (Berkeley) %G%
+ * @(#)ufs_inode.c 7.47 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
ufs_reclaim (ap)
struct vop_reclaim_args *ap;
{
ufs_reclaim (ap)
struct vop_reclaim_args *ap;
{
+ register struct vnode *vp = ap->a_vp;
register struct inode *ip;
int i, type;
register struct inode *ip;
int i, type;
- if (prtactive && ap->a_vp->v_usecount != 0)
- vprint("ufs_reclaim: pushing active", ap->a_vp);
+ if (prtactive && vp->v_usecount != 0)
+ vprint("ufs_reclaim: pushing active", vp);
/*
* Remove the inode from its hash chain.
*/
/*
* Remove the inode from its hash chain.
*/
remque(ip);
/*
* Purge old data structures associated with the inode.
*/
remque(ip);
/*
* Purge old data structures associated with the inode.
*/
if (ip->i_devvp) {
vrele(ip->i_devvp);
ip->i_devvp = 0;
if (ip->i_devvp) {
vrele(ip->i_devvp);
ip->i_devvp = 0;
#ifdef QUOTA
for (i = 0; i < MAXQUOTAS; i++) {
if (ip->i_dquot[i] != NODQUOT) {
#ifdef QUOTA
for (i = 0; i < MAXQUOTAS; i++) {
if (ip->i_dquot[i] != NODQUOT) {
- dqrele(ap->a_vp, ip->i_dquot[i]);
+ dqrele(vp, ip->i_dquot[i]);
ip->i_dquot[i] = NODQUOT;
}
}
#endif
ip->i_dquot[i] = NODQUOT;
}
}
#endif
- switch (ap->a_vp->v_mount->mnt_stat.f_type) {
+ switch (vp->v_mount->mnt_stat.f_type) {
case MOUNT_UFS:
type = M_FFSNODE;
break;
case MOUNT_UFS:
type = M_FFSNODE;
break;
default:
panic("ufs_reclaim: not ufs file");
}
default:
panic("ufs_reclaim: not ufs file");
}
- FREE(ap->a_vp->v_data, type);
- ap->a_vp->v_data = NULL;
+ FREE(vp->v_data, type);
+ vp->v_data = NULL;
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)lfs_bio.c 7.10 (Berkeley) %G%
+ * @(#)lfs_bio.c 7.11 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
lfs_bwrite (ap)
struct vop_bwrite_args *ap;
{
lfs_bwrite (ap)
struct vop_bwrite_args *ap;
{
+ register struct buf *bp = ap->a_bp;
int s;
#ifdef VERBOSE
printf("lfs_bwrite\n");
int s;
#ifdef VERBOSE
printf("lfs_bwrite\n");
* getnewbuf() would try to reclaim the buffers using bawrite, which
* isn't going to work.
*/
* getnewbuf() would try to reclaim the buffers using bawrite, which
* isn't going to work.
*/
- if (!(ap->a_bp->b_flags & B_LOCKED)) {
+ if (!(bp->b_flags & B_LOCKED)) {
- ap->a_bp->b_flags |= B_DELWRI | B_LOCKED;
- ap->a_bp->b_flags &= ~(B_READ | B_DONE | B_ERROR);
+ bp->b_flags |= B_DELWRI | B_LOCKED;
+ bp->b_flags &= ~(B_READ | B_DONE | B_ERROR);
s = splbio();
#define PMAP_BUG_FIX_HACK
#ifdef PMAP_BUG_FIX_HACK
if (((struct ufsmount *)
s = splbio();
#define PMAP_BUG_FIX_HACK
#ifdef PMAP_BUG_FIX_HACK
if (((struct ufsmount *)
- (ap->a_bp->b_vp->v_mount->mnt_data))->um_lfs->lfs_ivnode !=
- ap->a_bp->b_vp)
+ (bp->b_vp->v_mount->mnt_data))->um_lfs->lfs_ivnode !=
+ bp->b_vp)
- reassignbuf(ap->a_bp, ap->a_bp->b_vp);
+ reassignbuf(bp, bp->b_vp);
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)lfs_inode.c 7.65 (Berkeley) %G%
+ * @(#)lfs_inode.c 7.66 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
lfs_update (ap)
struct vop_update_args *ap;
{
lfs_update (ap)
struct vop_update_args *ap;
{
+ struct vnode *vp = ap->a_vp;
struct inode *ip;
#ifdef VERBOSE
printf("lfs_update\n");
#endif
struct inode *ip;
#ifdef VERBOSE
printf("lfs_update\n");
#endif
- if (ap->a_vp->v_mount->mnt_flag & MNT_RDONLY)
+ if (vp->v_mount->mnt_flag & MNT_RDONLY)
if ((ip->i_flag & (IUPD|IACC|ICHG|IMOD)) == 0)
return (0);
if (ip->i_flag&IACC)
if ((ip->i_flag & (IUPD|IACC|ICHG|IMOD)) == 0)
return (0);
if (ip->i_flag&IACC)
ip->i_flag &= ~(IUPD|IACC|ICHG|IMOD);
/* Push back the vnode and any dirty blocks it may have. */
ip->i_flag &= ~(IUPD|IACC|ICHG|IMOD);
/* Push back the vnode and any dirty blocks it may have. */
- return (ap->a_waitfor ? lfs_vflush(ap->a_vp) : 0);
+ return (ap->a_waitfor ? lfs_vflush(vp) : 0);
}
/* Update segment usage information when removing a block. */
}
/* Update segment usage information when removing a block. */
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)lfs_vnops.c 7.82 (Berkeley) %G%
+ * @(#)lfs_vnops.c 7.83 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
lfs_read (ap)
struct vop_read_args *ap;
{
lfs_read (ap)
struct vop_read_args *ap;
{
+ register struct uio *uio = ap->a_uio;
register struct inode *ip = VTOI(ap->a_vp);
register struct lfs *fs; /* LFS */
struct buf *bp;
register struct inode *ip = VTOI(ap->a_vp);
register struct lfs *fs; /* LFS */
struct buf *bp;
printf("lfs_read: ino %d\n", ip->i_number);
#endif
#ifdef DIAGNOSTIC
printf("lfs_read: ino %d\n", ip->i_number);
#endif
#ifdef DIAGNOSTIC
- if (ap->a_uio->uio_rw != UIO_READ)
+ if (uio->uio_rw != UIO_READ)
panic("ufs_read mode");
type = ip->i_mode & IFMT;
if (type != IFDIR && type != IFREG && type != IFLNK)
panic("ufs_read type");
#endif
panic("ufs_read mode");
type = ip->i_mode & IFMT;
if (type != IFDIR && type != IFREG && type != IFLNK)
panic("ufs_read type");
#endif
- if (ap->a_uio->uio_resid == 0)
+ if (uio->uio_resid == 0)
- if (ap->a_uio->uio_offset < 0)
+ if (uio->uio_offset < 0)
return (EINVAL);
ip->i_flag |= IACC;
fs = ip->i_lfs; /* LFS */
do {
return (EINVAL);
ip->i_flag |= IACC;
fs = ip->i_lfs; /* LFS */
do {
- lbn = lblkno(fs, ap->a_uio->uio_offset);
- on = blkoff(fs, ap->a_uio->uio_offset);
- n = MIN((unsigned)(fs->lfs_bsize - on), ap->a_uio->uio_resid);
- diff = ip->i_size - ap->a_uio->uio_offset;
+ lbn = lblkno(fs, uio->uio_offset);
+ on = blkoff(fs, uio->uio_offset);
+ n = MIN((unsigned)(fs->lfs_bsize - on), uio->uio_resid);
+ diff = ip->i_size - uio->uio_offset;
if (diff <= 0)
return (0);
if (diff < n)
if (diff <= 0)
return (0);
if (diff < n)
brelse(bp);
return (error);
}
brelse(bp);
return (error);
}
- error = uiomove(bp->b_un.b_addr + on, (int)n, ap->a_uio);
- if (n + on == fs->lfs_bsize || ap->a_uio->uio_offset == ip->i_size)
+ error = uiomove(bp->b_un.b_addr + on, (int)n, uio);
+ if (n + on == fs->lfs_bsize || uio->uio_offset == ip->i_size)
bp->b_flags |= B_AGE;
brelse(bp);
bp->b_flags |= B_AGE;
brelse(bp);
- } while (error == 0 && ap->a_uio->uio_resid > 0 && n != 0);
+ } while (error == 0 && uio->uio_resid > 0 && n != 0);
{
USES_VOP_TRUNCATE;
USES_VOP_UPDATE;
{
USES_VOP_TRUNCATE;
USES_VOP_UPDATE;
+ register struct vnode *vp = ap->a_vp;
struct proc *p = ap->a_uio->uio_procp;
struct proc *p = ap->a_uio->uio_procp;
- register struct inode *ip = VTOI(ap->a_vp);
+ register struct inode *ip = VTOI(vp);
register struct lfs *fs;
struct buf *bp;
daddr_t lbn;
register struct lfs *fs;
struct buf *bp;
daddr_t lbn;
if (ap->a_uio->uio_rw != UIO_WRITE)
panic("lfs_write mode");
#endif
if (ap->a_uio->uio_rw != UIO_WRITE)
panic("lfs_write mode");
#endif
- switch (ap->a_vp->v_type) {
case VREG:
if (ap->a_ioflag & IO_APPEND)
ap->a_uio->uio_offset = ip->i_size;
case VREG:
if (ap->a_ioflag & IO_APPEND)
ap->a_uio->uio_offset = ip->i_size;
* Maybe this should be above the vnode op call, but so long as
* file servers have no limits, i don't think it matters
*/
* Maybe this should be above the vnode op call, but so long as
* file servers have no limits, i don't think it matters
*/
- if (ap->a_vp->v_type == VREG && p &&
+ if (vp->v_type == VREG && p &&
ap->a_uio->uio_offset + ap->a_uio->uio_resid >
p->p_rlimit[RLIMIT_FSIZE].rlim_cur) {
psignal(p, SIGXFSZ);
ap->a_uio->uio_offset + ap->a_uio->uio_resid >
p->p_rlimit[RLIMIT_FSIZE].rlim_cur) {
psignal(p, SIGXFSZ);
lbn = lblkno(fs, ap->a_uio->uio_offset);
on = blkoff(fs, ap->a_uio->uio_offset);
n = MIN((unsigned)(fs->lfs_bsize - on), ap->a_uio->uio_resid);
lbn = lblkno(fs, ap->a_uio->uio_offset);
on = blkoff(fs, ap->a_uio->uio_offset);
n = MIN((unsigned)(fs->lfs_bsize - on), ap->a_uio->uio_resid);
- if (error = lfs_balloc(ap->a_vp, n, lbn, &bp))
+ if (error = lfs_balloc(vp, n, lbn, &bp))
break;
if (ap->a_uio->uio_offset + n > ip->i_size) {
ip->i_size = ap->a_uio->uio_offset + n;
break;
if (ap->a_uio->uio_offset + n > ip->i_size) {
ip->i_size = ap->a_uio->uio_offset + n;
- vnode_pager_setsize(ap->a_vp, (u_long)ip->i_size);
+ vnode_pager_setsize(vp, (u_long)ip->i_size);
- (void) vnode_pager_uncache(ap->a_vp);
+ (void) vnode_pager_uncache(vp);
n = MIN(n, size - bp->b_resid);
error = uiomove(bp->b_un.b_addr + on, n, ap->a_uio);
#ifdef NOTLFS /* LFS */
n = MIN(n, size - bp->b_resid);
error = uiomove(bp->b_un.b_addr + on, n, ap->a_uio);
#ifdef NOTLFS /* LFS */
ip->i_mode &= ~(ISUID|ISGID);
} while (error == 0 && ap->a_uio->uio_resid > 0 && n != 0);
if (error && (ap->a_ioflag & IO_UNIT)) {
ip->i_mode &= ~(ISUID|ISGID);
} while (error == 0 && ap->a_uio->uio_resid > 0 && n != 0);
if (error && (ap->a_ioflag & IO_UNIT)) {
- (void)VOP_TRUNCATE(ap->a_vp, osize, ap->a_ioflag & IO_SYNC, ap->a_cred);
+ (void)VOP_TRUNCATE(vp, osize, ap->a_ioflag & IO_SYNC, ap->a_cred);
ap->a_uio->uio_offset -= resid - ap->a_uio->uio_resid;
ap->a_uio->uio_resid = resid;
}
if (!error && (ap->a_ioflag & IO_SYNC))
ap->a_uio->uio_offset -= resid - ap->a_uio->uio_resid;
ap->a_uio->uio_resid = resid;
}
if (!error && (ap->a_ioflag & IO_SYNC))
- error = VOP_UPDATE(ap->a_vp, &time, &time, 1);
+ error = VOP_UPDATE(vp, &time, &time, 1);
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)mfs_vnops.c 7.32 (Berkeley) %G%
+ * @(#)mfs_vnops.c 7.33 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
mfs_strategy (ap)
struct vop_strategy_args *ap;
{
mfs_strategy (ap)
struct vop_strategy_args *ap;
{
+ register struct buf *bp = ap->a_bp;
register struct mfsnode *mfsp;
struct vnode *vp;
struct proc *p = curproc; /* XXX */
register struct mfsnode *mfsp;
struct vnode *vp;
struct proc *p = curproc; /* XXX */
- if (vfinddev(ap->a_bp->b_dev, VBLK, &vp) || vp->v_usecount == 0)
+ if (vfinddev(bp->b_dev, VBLK, &vp) || vp->v_usecount == 0)
panic("mfs_strategy: bad dev");
mfsp = VTOMFS(vp);
/* check for mini-root access */
if (mfsp->mfs_pid == 0) {
caddr_t base;
panic("mfs_strategy: bad dev");
mfsp = VTOMFS(vp);
/* check for mini-root access */
if (mfsp->mfs_pid == 0) {
caddr_t base;
- base = mfsp->mfs_baseoff + (ap->a_bp->b_blkno << DEV_BSHIFT);
- if (ap->a_bp->b_flags & B_READ)
- bcopy(base, ap->a_bp->b_un.b_addr, ap->a_bp->b_bcount);
+ base = mfsp->mfs_baseoff + (bp->b_blkno << DEV_BSHIFT);
+ if (bp->b_flags & B_READ)
+ bcopy(base, bp->b_un.b_addr, bp->b_bcount);
- bcopy(ap->a_bp->b_un.b_addr, base, ap->a_bp->b_bcount);
- biodone(ap->a_bp);
+ bcopy(bp->b_un.b_addr, base, bp->b_bcount);
+ biodone(bp);
} else if (mfsp->mfs_pid == p->p_pid) {
} else if (mfsp->mfs_pid == p->p_pid) {
- mfs_doio(ap->a_bp, mfsp->mfs_baseoff);
+ mfs_doio(bp, mfsp->mfs_baseoff);
- ap->a_bp->av_forw = mfsp->mfs_buflist;
- mfsp->mfs_buflist = ap->a_bp;
+ bp->av_forw = mfsp->mfs_buflist;
+ mfsp->mfs_buflist = bp;
wakeup((caddr_t)vp);
}
return (0);
wakeup((caddr_t)vp);
}
return (0);
mfs_close (ap)
struct vop_close_args *ap;
{
mfs_close (ap)
struct vop_close_args *ap;
{
- register struct mfsnode *mfsp = VTOMFS(ap->a_vp);
+ register struct vnode *vp = ap->a_vp;
+ register struct mfsnode *mfsp = VTOMFS(vp);
register struct buf *bp;
/*
register struct buf *bp;
/*
* we must invalidate any in core blocks, so that
* we can, free up its vnode.
*/
* we must invalidate any in core blocks, so that
* we can, free up its vnode.
*/
- vflushbuf(ap->a_vp, 0);
- if (vinvalbuf(ap->a_vp, 1))
+ vflushbuf(vp, 0);
+ if (vinvalbuf(vp, 1))
return (0);
/*
* There should be no way to have any more uses of this
* vnode, so if we find any other uses, it is a panic.
*/
return (0);
/*
* There should be no way to have any more uses of this
* vnode, so if we find any other uses, it is a panic.
*/
- if (ap->a_vp->v_usecount > 1)
- printf("mfs_close: ref count %d > 1\n", ap->a_vp->v_usecount);
- if (ap->a_vp->v_usecount > 1 || mfsp->mfs_buflist)
+ if (vp->v_usecount > 1)
+ printf("mfs_close: ref count %d > 1\n", vp->v_usecount);
+ if (vp->v_usecount > 1 || mfsp->mfs_buflist)
panic("mfs_close");
/*
* Send a request to the filesystem server to exit.
*/
mfsp->mfs_buflist = (struct buf *)(-1);
panic("mfs_close");
/*
* Send a request to the filesystem server to exit.
*/
mfsp->mfs_buflist = (struct buf *)(-1);
- wakeup((caddr_t)ap->a_vp);
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ufs_inode.c 7.46 (Berkeley) %G%
+ * @(#)ufs_inode.c 7.47 (Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
ufs_reclaim (ap)
struct vop_reclaim_args *ap;
{
ufs_reclaim (ap)
struct vop_reclaim_args *ap;
{
+ register struct vnode *vp = ap->a_vp;
register struct inode *ip;
int i, type;
register struct inode *ip;
int i, type;
- if (prtactive && ap->a_vp->v_usecount != 0)
- vprint("ufs_reclaim: pushing active", ap->a_vp);
+ if (prtactive && vp->v_usecount != 0)
+ vprint("ufs_reclaim: pushing active", vp);
/*
* Remove the inode from its hash chain.
*/
/*
* Remove the inode from its hash chain.
*/
remque(ip);
/*
* Purge old data structures associated with the inode.
*/
remque(ip);
/*
* Purge old data structures associated with the inode.
*/
if (ip->i_devvp) {
vrele(ip->i_devvp);
ip->i_devvp = 0;
if (ip->i_devvp) {
vrele(ip->i_devvp);
ip->i_devvp = 0;
#ifdef QUOTA
for (i = 0; i < MAXQUOTAS; i++) {
if (ip->i_dquot[i] != NODQUOT) {
#ifdef QUOTA
for (i = 0; i < MAXQUOTAS; i++) {
if (ip->i_dquot[i] != NODQUOT) {
- dqrele(ap->a_vp, ip->i_dquot[i]);
+ dqrele(vp, ip->i_dquot[i]);
ip->i_dquot[i] = NODQUOT;
}
}
#endif
ip->i_dquot[i] = NODQUOT;
}
}
#endif
- switch (ap->a_vp->v_mount->mnt_stat.f_type) {
+ switch (vp->v_mount->mnt_stat.f_type) {
case MOUNT_UFS:
type = M_FFSNODE;
break;
case MOUNT_UFS:
type = M_FFSNODE;
break;
default:
panic("ufs_reclaim: not ufs file");
}
default:
panic("ufs_reclaim: not ufs file");
}
- FREE(ap->a_vp->v_data, type);
- ap->a_vp->v_data = NULL;
+ FREE(vp->v_data, type);
+ vp->v_data = NULL;