Add extra argument to VOP_BMAP.
[unix-history] / usr / src / sys / ufs / ffs / ufs_vnops.c
index 25ee97d..a1818b5 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)ufs_vnops.c 7.104 (Berkeley) %G%
+ *     @(#)ufs_vnops.c 7.109 (Berkeley) %G%
  */
 
 #include <sys/param.h>
  */
 
 #include <sys/param.h>
@@ -314,8 +314,7 @@ ufs_setattr(ap)
                if (vap->va_atime.ts_sec != VNOVAL)
                        ip->i_flag |= IACC;
                if (vap->va_mtime.ts_sec != VNOVAL)
                if (vap->va_atime.ts_sec != VNOVAL)
                        ip->i_flag |= IACC;
                if (vap->va_mtime.ts_sec != VNOVAL)
-                       ip->i_flag |= IUPD;
-               ip->i_flag |= ICHG;
+                       ip->i_flag |= IUPD | ICHG;
                atimeval.tv_sec = vap->va_atime.ts_sec;
                atimeval.tv_usec = vap->va_atime.ts_nsec / 1000;
                mtimeval.tv_sec = vap->va_mtime.ts_sec;
                atimeval.tv_sec = vap->va_atime.ts_sec;
                atimeval.tv_usec = vap->va_atime.ts_nsec / 1000;
                mtimeval.tv_sec = vap->va_mtime.ts_sec;
@@ -1449,7 +1448,7 @@ ufs_readdir(ap)
                        aiov.iov_len = count;
                        MALLOC(dirbuf, caddr_t, count, M_TEMP, M_WAITOK);
                        aiov.iov_base = dirbuf;
                        aiov.iov_len = count;
                        MALLOC(dirbuf, caddr_t, count, M_TEMP, M_WAITOK);
                        aiov.iov_base = dirbuf;
-                       error = VOP_READ(ap->a_vp, uio, 0, ap->a_cred);
+                       error = VOP_READ(ap->a_vp, &auio, 0, ap->a_cred);
                        if (error == 0) {
                                readcnt = count - auio.uio_resid;
                                edp = (struct dirent *)&dirbuf[readcnt];
                        if (error == 0) {
                                readcnt = count - auio.uio_resid;
                                edp = (struct dirent *)&dirbuf[readcnt];
@@ -1584,7 +1583,7 @@ ufs_strategy(ap)
                panic("ufs_strategy: spec");
        if (bp->b_blkno == bp->b_lblkno) {
                if (error =
                panic("ufs_strategy: spec");
        if (bp->b_blkno == bp->b_lblkno) {
                if (error =
-                   VOP_BMAP(vp, bp->b_lblkno, NULL, &bp->b_blkno)) {
+                   VOP_BMAP(vp, bp->b_lblkno, NULL, &bp->b_blkno, NULL)) {
                        bp->b_error = error;
                        bp->b_flags |= B_ERROR;
                        biodone(bp);
                        bp->b_error = error;
                        bp->b_flags |= B_ERROR;
                        biodone(bp);
@@ -1643,7 +1642,6 @@ ufsspec_read(ap)
                struct ucred *a_cred;
        } */ *ap;
 {
                struct ucred *a_cred;
        } */ *ap;
 {
-       extern int (**spec_vnodeop_p)();
 
        /*
         * Set access flag.
 
        /*
         * Set access flag.
@@ -1664,7 +1662,6 @@ ufsspec_write(ap)
                struct ucred *a_cred;
        } */ *ap;
 {
                struct ucred *a_cred;
        } */ *ap;
 {
-       extern int (**spec_vnodeop_p)();
 
        /*
         * Set update and change flags.
 
        /*
         * Set update and change flags.
@@ -1687,7 +1684,6 @@ ufsspec_close(ap)
                struct proc *a_p;
        } */ *ap;
 {
                struct proc *a_p;
        } */ *ap;
 {
-       extern int (**spec_vnodeop_p)();
        register struct inode *ip = VTOI(ap->a_vp);
 
        if (ap->a_vp->v_usecount > 1 && !(ip->i_flag & ILOCKED))
        register struct inode *ip = VTOI(ap->a_vp);
 
        if (ap->a_vp->v_usecount > 1 && !(ip->i_flag & ILOCKED))
@@ -1862,9 +1858,8 @@ ufs_vinit(mntp, specops, fifoops, vpp)
        int (**fifoops)();
        struct vnode **vpp;
 {
        int (**fifoops)();
        struct vnode **vpp;
 {
-       struct inode *ip, *nip;
+       struct inode *ip;
        struct vnode *vp, *nvp;
        struct vnode *vp, *nvp;
-       extern int (**spec_vnodeop_p)();
 
        vp = *vpp;
        ip = VTOI(vp);
 
        vp = *vpp;
        ip = VTOI(vp);
@@ -1876,7 +1871,7 @@ ufs_vinit(mntp, specops, fifoops, vpp)
                        /*
                         * Discard unneeded vnode, but save its inode.
                         */
                        /*
                         * Discard unneeded vnode, but save its inode.
                         */
-                       remque(ip);
+                       ufs_ihashrem(ip);
                        IUNLOCK(ip);
                        nvp->v_data = vp->v_data;
                        vp->v_data = NULL;
                        IUNLOCK(ip);
                        nvp->v_data = vp->v_data;
                        vp->v_data = NULL;