devfs: add passing of file pointer through to dev_dclose
authorMarkus Pfeiffer <markus.pfeiffer@morphism.de>
Tue, 14 Jan 2014 22:02:40 +0000 (22:02 +0000)
committerMarkus Pfeiffer <markus.pfeiffer@morphism.de>
Tue, 21 Jan 2014 22:04:07 +0000 (22:04 +0000)
35 files changed:
sys/dev/disk/ccd/ccd.c
sys/dev/disk/dm/dm_pdev.c
sys/dev/disk/vn/vn.c
sys/dev/raid/vinum/vinumio.c
sys/emulation/ndis/subr_ndis.c
sys/gnu/vfs/ext2fs/ext2_quota.c
sys/gnu/vfs/ext2fs/ext2_vfsops.c
sys/kern/kern_acct.c
sys/kern/kern_ktrace.c
sys/kern/kern_sig.c
sys/kern/link_elf.c
sys/kern/link_elf_obj.c
sys/kern/tty.c
sys/kern/tty_tty.c
sys/kern/vfs_nlookup.c
sys/kern/vfs_subr.c
sys/kern/vfs_vnops.c
sys/kern/vfs_vopops.c
sys/sys/vfsops.h
sys/sys/vnode.h
sys/vfs/devfs/devfs_vnops.c
sys/vfs/fifofs/fifo_vnops.c
sys/vfs/hammer/hammer_ondisk.c
sys/vfs/hammer/hammer_recover.c
sys/vfs/hammer/hammer_volume.c
sys/vfs/hpfs/hpfs_vfsops.c
sys/vfs/isofs/cd9660/cd9660_vfsops.c
sys/vfs/msdosfs/msdosfs_vfsops.c
sys/vfs/ntfs/ntfs_vfsops.c
sys/vfs/smbfs/smbfs_io.c
sys/vfs/smbfs/smbfs_vnops.c
sys/vfs/udf/udf_vfsops.c
sys/vfs/ufs/ffs_vfsops.c
sys/vfs/ufs/ufs_quota.c
sys/vm/vm_swap.c

index d93697a..3add4f0 100644 (file)
@@ -1377,7 +1377,7 @@ ccdioctl(struct dev_ioctl_args *ap)
 #endif
                        if ((error = ccdlookup(cpp[i], &vpp[i])) != 0) {
                                for (j = 0; j < lookedup; ++j)
-                                       (void)vn_close(vpp[j], FREAD|FWRITE);
+                                       (void)vn_close(vpp[j], FREAD|FWRITE, NULL);
                                kfree(vpp, M_DEVBUF);
                                kfree(cpp, M_DEVBUF);
                                ccdunlock(cs);
@@ -1394,7 +1394,7 @@ ccdioctl(struct dev_ioctl_args *ap)
                 */
                if ((error = ccdinit(&ccd, cpp, ap->a_cred)) != 0) {
                        for (j = 0; j < lookedup; ++j)
-                               vn_close(vpp[j], FREAD|FWRITE);
+                               vn_close(vpp[j], FREAD|FWRITE, NULL);
                        kfree(vpp, M_DEVBUF);
                        kfree(cpp, M_DEVBUF);
                        ccdunlock(cs);
@@ -1460,7 +1460,7 @@ ccdioctl(struct dev_ioctl_args *ap)
                                vprint("CCDIOCCLR: vnode info",
                                    cs->sc_cinfo[i].ci_vp);
 #endif
-                       (void)vn_close(cs->sc_cinfo[i].ci_vp, FREAD|FWRITE);
+                       (void)vn_close(cs->sc_cinfo[i].ci_vp, FREAD|FWRITE, NULL);
                        kfree(cs->sc_cinfo[i].ci_path, M_DEVBUF);
                }
 
index 4e47634..08f49bb 100644 (file)
@@ -196,7 +196,7 @@ dm_pdev_rem(dm_pdev_t * dmp)
        KKASSERT(dmp != NULL);
 
        if (dmp->pdev_vnode != NULL) {
-               err = vn_close(dmp->pdev_vnode, FREAD | FWRITE);
+               err = vn_close(dmp->pdev_vnode, FREAD | FWRITE, NULL);
                if (err != 0)
                        return err;
        }
index 2d380dc..8a7a588 100644 (file)
@@ -564,7 +564,7 @@ vniocattach_file(struct vn_softc *vn, struct vn_ioctl *vio, cdev_t dev,
        error = vnsetcred(vn, cred);
        if (error) {
                vn->sc_vp = NULL;
-               vn_close(vp, flags);
+               vn_close(vp, flags, NULL);
                goto done;
        }
        vn->sc_flags |= VNF_INITED;
@@ -733,7 +733,8 @@ vnclear(struct vn_softc *vn)
        vn->sc_flags &= ~VNF_INITED;
        if (vn->sc_vp != NULL) {
                vn_close(vn->sc_vp,
-                   (vn->sc_flags & VNF_READONLY) ?  FREAD : (FREAD|FWRITE));
+                   (vn->sc_flags & VNF_READONLY) ? FREAD : (FREAD|FWRITE),
+                   NULL);
                vn->sc_vp = NULL;
        }
        vn->sc_flags &= ~VNF_READONLY;
index b065503..49669f5 100644 (file)
@@ -89,7 +89,7 @@ open_drive(struct drive *drive, struct proc *p, int verbose)
      * level drive be a device.
      */
     if (error == 0 && drive->vp->v_type != VCHR) {
-       vn_close(drive->vp, FREAD|FWRITE);
+        vn_close(drive->vp, FREAD|FWRITE, NULL);
        drive->vp = NULL;
        error = ENODEV;
     }
@@ -223,7 +223,7 @@ close_locked_drive(struct drive *drive)
      * do.  Get rid of them here first.
      */
     if (drive->vp) {
-       drive->lasterror = vn_close(drive->vp, FREAD|FWRITE);
+       drive->lasterror = vn_close(drive->vp, FREAD|FWRITE, NULL);
        drive->vp = NULL;
     }
     drive->flags &= ~VF_OPEN;
index e5c55d2..ddcec44 100644 (file)
@@ -2722,7 +2722,7 @@ NdisCloseFile(ndis_handle filehandle)
 
        if (fh->nf_type == NDIS_FH_TYPE_VFS) {
                vp = fh->nf_vp;
-               vn_close(vp, FREAD);
+               vn_close(vp, FREAD, NULL);
        }
 
        fh->nf_vp = NULL;
index b12a8dc..7f3b388 100644 (file)
@@ -478,7 +478,7 @@ ext2_quotaoff(struct mount *mp, int type)
        }
        ext2_dqflush(qvp);
        vclrflags(qvp, VSYSTEM);
-       error = vn_close(qvp, FREAD|FWRITE);
+       error = vn_close(qvp, FREAD|FWRITE, NULL);
        ump->um_quotas[type] = NULLVP;
        crfree(ump->um_cred[type]);
        ump->um_cred[type] = NOCRED;
index 07feede..a4f1a9c 100644 (file)
@@ -309,7 +309,7 @@ ext2_mount(struct mount *mp, char *path, caddr_t data, struct ucred *cred)
                        fs->s_rd_only = 1;
                        vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
                        VOP_OPEN(devvp, FREAD, FSCRED, NULL);
-                       VOP_CLOSE(devvp, FREAD|FWRITE);
+                       VOP_CLOSE(devvp, FREAD|FWRITE, NULL);
                        vn_unlock(devvp);
                }
                if (!error && (mp->mnt_flag & MNT_RELOAD))
@@ -352,7 +352,7 @@ ext2_mount(struct mount *mp, char *path, caddr_t data, struct ucred *cred)
                        fs->s_rd_only = 0;
                        vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
                        VOP_OPEN(devvp, FREAD|FWRITE, FSCRED, NULL);
-                       VOP_CLOSE(devvp, FREAD);
+                       VOP_CLOSE(devvp, FREAD, NULL);
                        vn_unlock(devvp);
                }
                if (args.fspec == NULL) {
@@ -856,7 +856,7 @@ ext2_mountfs(struct vnode *devvp, struct mount *mp, struct ucred *cred)
 out:
        if (bp)
                brelse(bp);
-       VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE);
+       VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, NULL);
        if (ump) {
                bsd_free(ump->um_e2fs->s_es, M_EXT2MNT);
                bsd_free(ump->um_e2fs, M_EXT2MNT);
@@ -908,7 +908,7 @@ ext2_unmount(struct mount *mp, int mntflags)
                        ULCK_BUF(fs->s_block_bitmap[i])
 
        ump->um_devvp->v_rdev->si_mountpoint = NULL;
-       error = VOP_CLOSE(ump->um_devvp, ronly ? FREAD : FREAD|FWRITE);
+       error = VOP_CLOSE(ump->um_devvp, ronly ? FREAD : FREAD|FWRITE, NULL);
        vrele(ump->um_devvp);
        bsd_free(fs->s_es, M_EXT2MNT);
        bsd_free(fs, M_EXT2MNT);
index aa3314b..4d116dd 100644 (file)
@@ -163,7 +163,7 @@ sys_acct(struct acct_args *uap)
        if (acctp != NULLVP || savacctp != NULLVP) {
                callout_stop(&acctwatch_handle);
                error = vn_close((acctp != NULLVP ? acctp : savacctp),
-                               FWRITE | O_APPEND);
+                               FWRITE | O_APPEND, NULL);
                acctp = savacctp = NULLVP;
        }
 
@@ -319,7 +319,7 @@ acctwatch(void *a)
 
        if (savacctp != NULLVP) {
                if (savacctp->v_type == VBAD) {
-                       (void) vn_close(savacctp, FWRITE | O_APPEND);
+                       (void) vn_close(savacctp, FWRITE | O_APPEND, NULL);
                        savacctp = NULLVP;
                        return;
                }
@@ -333,7 +333,7 @@ acctwatch(void *a)
                if (acctp == NULLVP)
                        return;
                if (acctp->v_type == VBAD) {
-                       (void) vn_close(acctp, FWRITE | O_APPEND);
+                       (void) vn_close(acctp, FWRITE | O_APPEND, NULL);
                        acctp = NULLVP;
                        return;
                }
index 23a8d6b..4985d1b 100644 (file)
@@ -447,7 +447,7 @@ ktrdestroy(struct ktrace_node **tracenodep)
                *tracenodep = NULL;
                KKASSERT(tracenode->kn_refs > 0);
                if (atomic_fetchadd_int(&tracenode->kn_refs, -1) == 1) {
-                       vn_close(tracenode->kn_vp, FREAD|FWRITE);
+                       vn_close(tracenode->kn_vp, FREAD|FWRITE, NULL);
                        tracenode->kn_vp = NULL;
                        kfree(tracenode, M_KTRACE);
                }
index 1aa023b..f26cb99 100644 (file)
@@ -2360,7 +2360,7 @@ out1:
        lf.l_type = F_UNLCK;
        VOP_ADVLOCK(vp, (caddr_t)p, F_UNLCK, &lf, 0);
 out2:
-       error1 = vn_close(vp, FWRITE);
+       error1 = vn_close(vp, FWRITE, NULL);
        if (error == 0)
                error = error1;
        return (error);
index ba26320..c9a828b 100644 (file)
@@ -701,7 +701,7 @@ out:
     if (firstpage)
        kfree(firstpage, M_LINKER);
     vn_unlock(vp);
-    vn_close(vp, FREAD);
+    vn_close(vp, FREAD, NULL);
 
     return error;
 }
index cbc4d61..e9bdcd1 100644 (file)
@@ -827,7 +827,7 @@ out:
        if (hdr)
                kfree(hdr, M_LINKER);
        vn_unlock(vp);
-       vn_close(vp, FREAD);
+       vn_close(vp, FREAD, NULL);
 
        return error;
 }
index 7aaf1a8..676449b 100644 (file)
@@ -360,7 +360,7 @@ retry:
                sp->s_ttyvp = NULL;
                if (vp->v_flag & VCTTYISOPEN) {
                        vclrflags(vp, VCTTYISOPEN);
-                       VOP_CLOSE(vp, FREAD|FWRITE);
+                       VOP_CLOSE(vp, FREAD|FWRITE, NULL);
                }
                vn_unlock(vp);
                if (dorevoke)
index 016f2f5..a3d4677 100644 (file)
@@ -117,7 +117,7 @@ retry:
        if (ttyvp != cttyvp(p) || (ttyvp->v_flag & VCTTYISOPEN)) {
                kprintf("Warning: cttyopen: race-2 avoided\n");
                if (error == 0)
-                       VOP_CLOSE(ttyvp, FREAD|FWRITE);
+                       VOP_CLOSE(ttyvp, FREAD|FWRITE, NULL);
                vn_unlock(ttyvp);
                vdrop(ttyvp);
                goto retry;
@@ -167,7 +167,7 @@ retry:
                        goto retry;
                }
                vclrflags(ttyvp, VCTTYISOPEN);
-               error = VOP_CLOSE(ttyvp, FREAD|FWRITE);
+               error = VOP_CLOSE(ttyvp, FREAD|FWRITE, NULL);
                vn_unlock(ttyvp);
                vrele(ttyvp);
        } else {
index c1a6c7d..9367300 100644 (file)
@@ -321,7 +321,7 @@ nlookup_done(struct nlookupdata *nd)
                vn_unlock(nd->nl_open_vp);
                nd->nl_flags &= ~NLC_LOCKVP;
        }
-       vn_close(nd->nl_open_vp, nd->nl_vp_fmode);
+       vn_close(nd->nl_open_vp, nd->nl_vp_fmode, NULL);
        nd->nl_open_vp = NULL;
     }
     if (nd->nl_dvp) {
index ec78517..b2a1d60 100644 (file)
@@ -1204,9 +1204,9 @@ vclean_vxlocked(struct vnode *vp, int flags)
        if (active && (flags & DOCLOSE)) {
                while ((n = vp->v_opencount) != 0) {
                        if (vp->v_writecount)
-                               VOP_CLOSE(vp, FWRITE|FNONBLOCK);
+                               VOP_CLOSE(vp, FWRITE|FNONBLOCK, NULL);
                        else
-                               VOP_CLOSE(vp, FNONBLOCK);
+                               VOP_CLOSE(vp, FNONBLOCK, NULL);
                        if (vp->v_opencount == n) {
                                kprintf("Warning: unable to force-close"
                                       " vnode %p\n", vp);
index 40b0bc5..152b372 100644 (file)
@@ -412,13 +412,13 @@ ncp_writechk(struct nchandle *nch)
  * MPSAFE
  */
 int
-vn_close(struct vnode *vp, int flags)
+vn_close(struct vnode *vp, int flags, struct file *fp)
 {
        int error;
 
        error = vn_lock(vp, LK_SHARED | LK_RETRY | LK_FAILRECLAIM);
        if (error == 0) {
-               error = VOP_CLOSE(vp, flags);
+               error = VOP_CLOSE(vp, flags, fp);
                vn_unlock(vp);
        }
        vrele(vp);
@@ -1102,7 +1102,7 @@ vn_closefile(struct file *fp)
        int error;
 
        fp->f_ops = &badfileops;
-       error = vn_close(((struct vnode *)fp->f_data), fp->f_flag);
+       error = vn_close(((struct vnode *)fp->f_data), fp->f_flag, fp);
        return (error);
 }
 
index 5e44186..7811295 100644 (file)
@@ -296,7 +296,8 @@ vop_open(struct vop_ops *ops, struct vnode *vp, int mode, struct ucred *cred,
  * MPSAFE
  */
 int
-vop_close(struct vop_ops *ops, struct vnode *vp, int fflag)
+vop_close(struct vop_ops *ops, struct vnode *vp, int fflag,
+         struct file *fp)
 {
        struct vop_close_args ap;
        VFS_MPLOCK_DECLARE;
@@ -305,6 +306,7 @@ vop_close(struct vop_ops *ops, struct vnode *vp, int fflag)
        ap.a_head.a_desc = &vop_close_desc;
        ap.a_head.a_ops = ops;
        ap.a_vp = vp;
+       ap.a_fp = fp;
        ap.a_fflag = fflag;
 
        VFS_MPLOCK1(vp->v_mount);
index 60aad7d..cd6c9d2 100644 (file)
@@ -742,7 +742,8 @@ int vop_old_mknod(struct vop_ops *ops, struct vnode *dvp,
                struct vattr *vap);
 int vop_open(struct vop_ops *ops, struct vnode *vp, int mode,
                struct ucred *cred, struct file *file);
-int vop_close(struct vop_ops *ops, struct vnode *vp, int fflag);
+int vop_close(struct vop_ops *ops, struct vnode *vp, int fflag,
+               struct file *file);
 int vop_access(struct vop_ops *ops, struct vnode *vp, int mode, int flags,
                struct ucred *cred);
 int vop_getattr(struct vop_ops *ops, struct vnode *vp, struct vattr *vap);
@@ -982,8 +983,8 @@ extern struct syslink_desc vop_nrename_desc;
  */
 #define VOP_OPEN(vp, mode, cred, fp)                   \
        vop_open(*(vp)->v_ops, vp, mode, cred, fp)
-#define VOP_CLOSE(vp, fflag)                           \
-       vop_close(*(vp)->v_ops, vp, fflag)
+#define VOP_CLOSE(vp, fflag, fp)                       \
+       vop_close(*(vp)->v_ops, vp, fflag, fp)
 #define VOP_ACCESS(vp, mode, cred)                     \
        vop_access(*(vp)->v_ops, vp, mode, 0, cred)
 #define VOP_EACCESS(vp, mode, cred)                    \
index 34fdb3a..bf8d63e 100644 (file)
@@ -473,7 +473,7 @@ int vrecycle (struct vnode *vp);
 int    vmaxiosize (struct vnode *vp);
 void   vn_strategy(struct vnode *vp, struct bio *bio);
 int    vn_cache_strategy(struct vnode *vp, struct bio *bio);
-int    vn_close (struct vnode *vp, int flags);
+int    vn_close (struct vnode *vp, int flags, struct file *fp);
 void   vn_gone (struct vnode *vp);
 int    vn_isdisk (struct vnode *vp, int *errp);
 int    vn_islocked (struct vnode *vp);
index 9a0413f..0856e9d 100644 (file)
@@ -1126,7 +1126,7 @@ devfs_fo_close(struct file *fp)
        int error;
 
        fp->f_ops = &badfileops;
-       error = vn_close(vp, fp->f_flag);
+       error = vn_close(vp, fp->f_flag, fp);
        devfs_clear_cdevpriv(fp);
 
        return (error);
index 29373bc..77098e5 100644 (file)
@@ -254,7 +254,7 @@ fifo_open(struct vop_open_args *ap)
        return (error);
 bad:
        vop_stdopen(ap);        /* bump opencount/writecount as appropriate */
-       VOP_CLOSE(vp, ap->a_mode);
+       VOP_CLOSE(vp, ap->a_mode, NULL);
 done:
        lwkt_reltoken(&vp->v_token);
        return (error);
index 43b5866..24985fb 100644 (file)
@@ -238,7 +238,7 @@ late_failure:
                if (setmp)
                        volume->devvp->v_rdev->si_mountpoint = NULL;
                vn_lock(volume->devvp, LK_EXCLUSIVE | LK_RETRY);
-               VOP_CLOSE(volume->devvp, ronly ? FREAD : FREAD|FWRITE);
+               VOP_CLOSE(volume->devvp, ronly ? FREAD : FREAD|FWRITE, NULL);
                vn_unlock(volume->devvp);
                hammer_free_volume(volume);
        }
@@ -257,11 +257,11 @@ hammer_adjust_volume_mode(hammer_volume_t volume, void *data __unused)
                if (volume->io.hmp->ronly) {
                        /* do not call vinvalbuf */
                        VOP_OPEN(volume->devvp, FREAD, FSCRED, NULL);
-                       VOP_CLOSE(volume->devvp, FREAD|FWRITE);
+                       VOP_CLOSE(volume->devvp, FREAD|FWRITE, NULL);
                } else {
                        /* do not call vinvalbuf */
                        VOP_OPEN(volume->devvp, FREAD|FWRITE, FSCRED, NULL);
-                       VOP_CLOSE(volume->devvp, FREAD);
+                       VOP_CLOSE(volume->devvp, FREAD, NULL);
                }
                vn_unlock(volume->devvp);
        }
@@ -328,7 +328,7 @@ hammer_unload_volume(hammer_volume_t volume, void *data __unused)
                         */
                        vn_lock(volume->devvp, LK_EXCLUSIVE | LK_RETRY);
                        vinvalbuf(volume->devvp, 0, 0, 0);
-                       VOP_CLOSE(volume->devvp, FREAD);
+                       VOP_CLOSE(volume->devvp, FREAD, NULL);
                        vn_unlock(volume->devvp);
                } else {
                        /*
@@ -337,7 +337,7 @@ hammer_unload_volume(hammer_volume_t volume, void *data __unused)
                         */
                        vn_lock(volume->devvp, LK_EXCLUSIVE | LK_RETRY);
                        vinvalbuf(volume->devvp, V_SAVE, 0, 0);
-                       VOP_CLOSE(volume->devvp, FREAD|FWRITE);
+                       VOP_CLOSE(volume->devvp, FREAD|FWRITE, NULL);
                        vn_unlock(volume->devvp);
                }
        }
index 11ef406..d9406ac 100644 (file)
@@ -1358,7 +1358,7 @@ hammer_recover_redo_exec(hammer_mount_t hmp, hammer_fifo_redo_t redo)
                                (intmax_t)redo->redo_objid,
                                redo->redo_localization, error);
                }
-               VOP_CLOSE(vp, FREAD|FWRITE);
+               VOP_CLOSE(vp, FREAD|FWRITE, NULL);
                break;
        case HAMMER_REDO_TRUNC:
                VATTR_NULL(&va);
index 5b3905a..bc4b241 100644 (file)
@@ -784,7 +784,7 @@ hammer_close_device(struct vnode **devvpp, int ronly)
        if (*devvpp) {
                vn_lock(*devvpp, LK_EXCLUSIVE | LK_RETRY);
                vinvalbuf(*devvpp, ronly ? 0 : V_SAVE, 0, 0);
-               VOP_CLOSE(*devvpp, (ronly ? FREAD : FREAD|FWRITE));
+               VOP_CLOSE(*devvpp, (ronly ? FREAD : FREAD|FWRITE), NULL);
                vn_unlock(*devvpp);
                vrele(*devvpp);
                *devvpp = NULL;
index ed9c894..af65891 100644 (file)
@@ -333,7 +333,7 @@ failed:
        mp->mnt_data = NULL;
        dev->si_mountpoint = NULL;
        vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
-       VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE);
+       VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, NULL);
        vn_unlock(devvp);
        return (error);
 }
@@ -365,7 +365,7 @@ hpfs_unmount(struct mount *mp, int mntflags)
 
        vn_lock(hpmp->hpm_devvp, LK_EXCLUSIVE | LK_RETRY);
        vinvalbuf(hpmp->hpm_devvp, V_SAVE, 0, 0);
-       error = VOP_CLOSE(hpmp->hpm_devvp, ronly ? FREAD : FREAD|FWRITE);
+       error = VOP_CLOSE(hpmp->hpm_devvp, ronly ? FREAD : FREAD|FWRITE, NULL);
        vn_unlock(hpmp->hpm_devvp);
 
        vrele(hpmp->hpm_devvp);
index f67b488..2e43270 100644 (file)
@@ -166,7 +166,7 @@ iso_mountroot(struct mount *mp)
        args.ssector = iso_get_ssector(rootdev);
 
        vn_lock(rootvp, LK_EXCLUSIVE | LK_RETRY);
-       VOP_CLOSE(rootvp, FREAD);
+       VOP_CLOSE(rootvp, FREAD, NULL);
        vn_unlock(rootvp);
 
        if (bootverbose)
@@ -539,7 +539,7 @@ out:
                brelse(supbp);
        if (needclose) {
                vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
-               VOP_CLOSE(devvp, FREAD);
+               VOP_CLOSE(devvp, FREAD, NULL);
                vn_unlock(devvp);
        }
        if (isomp) {
@@ -579,7 +579,7 @@ cd9660_unmount(struct mount *mp, int mntflags)
 
        isomp->im_devvp->v_rdev->si_mountpoint = NULL;
        vn_lock(isomp->im_devvp, LK_EXCLUSIVE | LK_RETRY);
-       error = VOP_CLOSE(isomp->im_devvp, FREAD);
+       error = VOP_CLOSE(isomp->im_devvp, FREAD, NULL);
        vn_unlock(isomp->im_devvp);
        vrele(isomp->im_devvp);
        kfree((caddr_t)isomp, M_ISOFSMNT);
index b5ccce9..2faf7e1 100644 (file)
@@ -198,7 +198,7 @@ msdosfs_mount(struct mount *mp, char *path, caddr_t data, struct ucred *cred)
                                devvp = pmp->pm_devvp;
                                vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
                                VOP_OPEN(devvp, FREAD, FSCRED, NULL);
-                               VOP_CLOSE(devvp, FREAD|FWRITE);
+                               VOP_CLOSE(devvp, FREAD|FWRITE, NULL);
                                vn_unlock(devvp);
                                pmp->pm_flags |= MSDOSFSMNT_RONLY;
                        }
@@ -223,7 +223,7 @@ msdosfs_mount(struct mount *mp, char *path, caddr_t data, struct ucred *cred)
                                }
                        }
                        VOP_OPEN(devvp, FREAD|FWRITE, FSCRED, NULL);
-                       VOP_CLOSE(devvp, FREAD);
+                       VOP_CLOSE(devvp, FREAD, NULL);
                        vn_unlock(devvp);
                        pmp->pm_flags &= ~MSDOSFSMNT_RONLY;
                }
@@ -615,7 +615,7 @@ error_exit:
                brelse(bp);
        }
        vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
-       VOP_CLOSE(devvp, ronly ? FREAD : FREAD | FWRITE);
+       VOP_CLOSE(devvp, ronly ? FREAD : FREAD | FWRITE, NULL);
        vn_unlock(devvp);
        if (pmp) {
                if (pmp->pm_inusemap)
@@ -677,7 +677,8 @@ msdosfs_unmount(struct mount *mp, int mntflags)
 #endif
        vn_lock(pmp->pm_devvp, LK_EXCLUSIVE | LK_RETRY);
        error = VOP_CLOSE(pmp->pm_devvp,
-                   (pmp->pm_flags&MSDOSFSMNT_RONLY) ? FREAD : FREAD | FWRITE);
+                   (pmp->pm_flags&MSDOSFSMNT_RONLY) ? FREAD : FREAD | FWRITE,
+                   NULL);
        vn_unlock(pmp->pm_devvp);
        vrele(pmp->pm_devvp);
        kfree(pmp->pm_inusemap, M_MSDOSFSFAT);
index 7b4605f..d5b1fbd 100644 (file)
@@ -604,7 +604,7 @@ out:
        VOP__UNLOCK(devvp, 0);
 #else
        vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
-       (void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE);
+       (void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, NULL);
        vn_unlock(devvp);
 #endif
        
@@ -663,7 +663,7 @@ ntfs_unmount(struct mount *mp, int mntflags)
 
        vn_lock(ntmp->ntm_devvp, LK_EXCLUSIVE | LK_RETRY);
        vinvalbuf(ntmp->ntm_devvp, V_SAVE, 0, 0);
-       error = VOP_CLOSE(ntmp->ntm_devvp, ronly ? FREAD : FREAD|FWRITE);
+       error = VOP_CLOSE(ntmp->ntm_devvp, ronly ? FREAD : FREAD|FWRITE, NULL);
        vn_unlock(ntmp->ntm_devvp);
 
        vrele(ntmp->ntm_devvp);
index 82a8f33..1231685 100644 (file)
@@ -546,7 +546,7 @@ smbfs_putpages(struct vop_putpages_args *ap)
        cred = td->td_proc->p_ucred;
        VOP_OPEN(vp, FWRITE, cred, NULL);
        error = vop_stdputpages(ap);
-       VOP_CLOSE(vp, FWRITE, cred);
+       VOP_CLOSE(vp, FWRITE, cred, NULL);
        return error;
 #else
        struct uio uio;
index 4601083..d9c70b4 100644 (file)
@@ -376,7 +376,7 @@ smbfs_setattr(struct vop_setattr_args *ap)
                                VOP_GETATTR(vp, &vattr);*/
                                if (mtime)
                                        np->n_mtime = *mtime;
-                               VOP_CLOSE(vp, FWRITE);
+                               VOP_CLOSE(vp, FWRITE, NULL);
                                }
                        } else if ((vcp->vc_sopt.sv_caps & SMB_CAP_NT_SMBS)) {
                                error = smbfs_smb_setptime2(np, mtime, atime, 0, &scred);
index eeda5d1..f0615a8 100644 (file)
@@ -397,7 +397,7 @@ bail:
                brelse(bp);
        if (needclose) {
                vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
-               VOP_CLOSE(devvp, FREAD);
+               VOP_CLOSE(devvp, FREAD, NULL);
                vn_unlock(devvp);
        }
        return(error);
@@ -419,7 +419,7 @@ udf_unmount(struct mount *mp, int mntflags)
 
        udfmp->im_devvp->v_rdev->si_mountpoint = NULL;
        vn_lock(udfmp->im_devvp, LK_EXCLUSIVE | LK_RETRY);
-       error = VOP_CLOSE(udfmp->im_devvp, FREAD);
+       error = VOP_CLOSE(udfmp->im_devvp, FREAD, NULL);
        vn_unlock(udfmp->im_devvp);
        vrele(udfmp->im_devvp);
 
index 329450c..d82176f 100644 (file)
@@ -406,10 +406,10 @@ success:
                        vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
                        if (ronly) {
                                VOP_OPEN(devvp, FREAD, FSCRED, NULL);
-                               VOP_CLOSE(devvp, FREAD|FWRITE);
+                               VOP_CLOSE(devvp, FREAD|FWRITE, NULL);
                        } else {
                                VOP_OPEN(devvp, FREAD|FWRITE, FSCRED, NULL);
-                               VOP_CLOSE(devvp, FREAD);
+                               VOP_CLOSE(devvp, FREAD, NULL);
                        }
                        vn_unlock(devvp);
                        ffs_sbupdate(ump, MNT_WAIT);
@@ -791,7 +791,7 @@ out:
        if (bp)
                brelse(bp);
        vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
-       VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE);
+       VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, NULL);
        vn_unlock(devvp);
        if (ump) {
                ufs_ihashuninit(ump);
@@ -867,7 +867,9 @@ ffs_unmount(struct mount *mp, int mntflags)
 
        vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY);
        vinvalbuf(ump->um_devvp, V_SAVE, 0, 0);
-       error = VOP_CLOSE(ump->um_devvp, fs->fs_ronly ? FREAD : FREAD|FWRITE);
+       error = VOP_CLOSE(ump->um_devvp, 
+                       fs->fs_ronly ? FREAD : FREAD|FWRITE,
+                       NULL);
        vn_unlock(ump->um_devvp);
 
        vrele(ump->um_devvp);
index 3c95266..fa3627a 100644 (file)
@@ -515,7 +515,7 @@ ufs_quotaoff(struct mount *mp, int type)
        }
        ufs_dqflush(qvp);
        vclrflags(qvp, VSYSTEM);
-       error = vn_close(qvp, FREAD|FWRITE);
+       error = vn_close(qvp, FREAD|FWRITE, NULL);
        ump->um_quotas[type] = NULLVP;
        crfree(ump->um_cred[type]);
        ump->um_cred[type] = NOCRED;
index a24a7bb..047ade7 100644 (file)
@@ -303,7 +303,7 @@ swaponvp(struct thread *td, struct vnode *vp, u_quad_t nblks)
                dpsize = dev_dpsize(dev);
                if (dpsize == -1) {
                        vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
-                       VOP_CLOSE(vp, FREAD | FWRITE);
+                       VOP_CLOSE(vp, FREAD | FWRITE, NULL);
                        vn_unlock(vp);
                        error = ENXIO;
                        goto done;
@@ -312,7 +312,7 @@ swaponvp(struct thread *td, struct vnode *vp, u_quad_t nblks)
        }
        if (nblks == 0) {
                vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
-               VOP_CLOSE(vp, FREAD | FWRITE);
+               VOP_CLOSE(vp, FREAD | FWRITE, NULL);
                vn_unlock(vp);
                error = ENXIO;
                goto done;
@@ -340,7 +340,7 @@ swaponvp(struct thread *td, struct vnode *vp, u_quad_t nblks)
                kprintf("exceeded maximum of %d blocks per swap unit\n",
                        (int)BLIST_MAXBLKS / nswdev);
                vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
-               VOP_CLOSE(vp, FREAD | FWRITE);
+               VOP_CLOSE(vp, FREAD | FWRITE, NULL);
                vn_unlock(vp);
                error = ENXIO;
                goto done;
@@ -546,7 +546,7 @@ swapoff_one(int index)
        }
 
        vn_lock(sp->sw_vp, LK_EXCLUSIVE | LK_RETRY);
-       VOP_CLOSE(sp->sw_vp, FREAD | FWRITE);
+       VOP_CLOSE(sp->sw_vp, FREAD | FWRITE, NULL);
        vn_unlock(sp->sw_vp);
        vrele(sp->sw_vp);
        bzero(swdevt + index, sizeof(struct swdevt));