diff options
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/cd9660/cd9660_vfsops.c | 5 | ||||
-rw-r--r-- | sys/fs/coda/coda_vfsops.c | 5 | ||||
-rw-r--r-- | sys/fs/devfs/devfs_vfsops.c | 9 | ||||
-rw-r--r-- | sys/fs/fdescfs/fdesc.h | 4 | ||||
-rw-r--r-- | sys/fs/fdescfs/fdesc_vfsops.c | 5 | ||||
-rw-r--r-- | sys/fs/hpfs/hpfs_vfsops.c | 7 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 17 | ||||
-rw-r--r-- | sys/fs/ntfs/ntfs_vfsops.c | 9 | ||||
-rw-r--r-- | sys/fs/nullfs/null_vfsops.c | 6 | ||||
-rw-r--r-- | sys/fs/nwfs/nwfs_vfsops.c | 7 | ||||
-rw-r--r-- | sys/fs/portalfs/portal_vfsops.c | 5 | ||||
-rw-r--r-- | sys/fs/pseudofs/pseudofs.c | 4 | ||||
-rw-r--r-- | sys/fs/pseudofs/pseudofs.h | 3 | ||||
-rw-r--r-- | sys/fs/smbfs/smbfs_vfsops.c | 6 | ||||
-rw-r--r-- | sys/fs/udf/udf_vfsops.c | 4 | ||||
-rw-r--r-- | sys/fs/umapfs/umap_vfsops.c | 5 | ||||
-rw-r--r-- | sys/fs/unionfs/union_vfsops.c | 5 | ||||
-rw-r--r-- | sys/fs/unionfs/union_vnops.c | 2 |
18 files changed, 59 insertions, 49 deletions
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index e91f4b1..10e3bc4 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -554,7 +554,7 @@ cd9660_unmount(mp, mntflags, td) if (mntinvalbuf(mp)) return EBUSY; #endif - if ((error = vflush(mp, 0, flags))) + if ((error = vflush(mp, 0, flags, td))) return (error); isomp = VFSTOISOFS(mp); @@ -578,9 +578,10 @@ cd9660_unmount(mp, mntflags, td) * Return root of a filesystem */ static int -cd9660_root(mp, vpp) +cd9660_root(mp, vpp, td) struct mount *mp; struct vnode **vpp; + struct thread *td; { struct iso_mnt *imp = VFSTOISOFS(mp); struct iso_directory_record *dp = diff --git a/sys/fs/coda/coda_vfsops.c b/sys/fs/coda/coda_vfsops.c index e7290e7..09025d5 100644 --- a/sys/fs/coda/coda_vfsops.c +++ b/sys/fs/coda/coda_vfsops.c @@ -252,7 +252,7 @@ coda_unmount(vfsp, mntflags, td) active = coda_kill(vfsp, NOT_DOWNCALL); ASSERT_VOP_LOCKED(mi->mi_rootvp, "coda_unmount"); mi->mi_rootvp->v_vflag &= ~VV_ROOT; - error = vflush(mi->mi_vfsp, 0, FORCECLOSE); + error = vflush(mi->mi_vfsp, 0, FORCECLOSE, td); #ifdef CODA_VERBOSE printf("coda_unmount: active = %d, vflush active %d\n", active, error); #endif @@ -280,9 +280,10 @@ coda_unmount(vfsp, mntflags, td) * find root of cfs */ int -coda_root(vfsp, vpp) +coda_root(vfsp, vpp, td) struct mount *vfsp; struct vnode **vpp; + struct thread *td; { struct coda_mntinfo *mi = vftomi(vfsp); struct vnode **result; diff --git a/sys/fs/devfs/devfs_vfsops.c b/sys/fs/devfs/devfs_vfsops.c index a10efa2..f23d660 100644 --- a/sys/fs/devfs/devfs_vfsops.c +++ b/sys/fs/devfs/devfs_vfsops.c @@ -101,7 +101,7 @@ devfs_nmount(mp, ndp, td) fmp->dm_basedir = fmp->dm_rootdir; devfs_rules_newmount(fmp, td); - error = devfs_root(mp, &rvp); + error = devfs_root(mp, &rvp, td); if (error) { lockdestroy(&fmp->dm_lock); FREE(fmp, M_DEVFS); @@ -130,7 +130,7 @@ devfs_unmount(mp, mntflags, td) if (mntflags & MNT_FORCE) flags |= FORCECLOSE; /* There is 1 extra root vnode reference from devfs_mount(). */ - error = vflush(mp, 1, flags); + error = vflush(mp, 1, flags, td); if (error) return (error); devfs_purge(fmp->dm_rootdir); @@ -144,16 +144,15 @@ devfs_unmount(mp, mntflags, td) /* Return locked reference to root. */ static int -devfs_root(mp, vpp) +devfs_root(mp, vpp, td) struct mount *mp; struct vnode **vpp; + struct thread *td; { int error; - struct thread *td; struct vnode *vp; struct devfs_mount *dmp; - td = curthread; /* XXX */ dmp = VFSTODEVFS(mp); error = devfs_allocv(dmp->dm_rootdir, mp, &vp, td); if (error) diff --git a/sys/fs/fdescfs/fdesc.h b/sys/fs/fdescfs/fdesc.h index a6ffb51..dfe4c6b 100644 --- a/sys/fs/fdescfs/fdesc.h +++ b/sys/fs/fdescfs/fdesc.h @@ -58,8 +58,8 @@ struct fdescnode { #define VFSTOFDESC(mp) ((struct fdescmount *)((mp)->mnt_data)) #define VTOFDESC(vp) ((struct fdescnode *)(vp)->v_data) -extern int fdesc_init(struct vfsconf *); -extern int fdesc_root(struct mount *, struct vnode **); +extern vfs_init_t fdesc_init; +extern vfs_root_t fdesc_root; extern int fdesc_allocvp(fdntype, int, struct mount *, struct vnode **, struct thread *); #endif /* _KERNEL */ diff --git a/sys/fs/fdescfs/fdesc_vfsops.c b/sys/fs/fdescfs/fdesc_vfsops.c index 18e7ccf..c6514a9 100644 --- a/sys/fs/fdescfs/fdesc_vfsops.c +++ b/sys/fs/fdescfs/fdesc_vfsops.c @@ -117,7 +117,7 @@ fdesc_unmount(mp, mntflags, td) * There is 1 extra root vnode reference corresponding * to f_root. */ - if ((error = vflush(mp, 1, flags)) != 0) + if ((error = vflush(mp, 1, flags, td)) != 0) return (error); /* @@ -130,9 +130,10 @@ fdesc_unmount(mp, mntflags, td) } int -fdesc_root(mp, vpp) +fdesc_root(mp, vpp, td) struct mount *mp; struct vnode **vpp; + struct thread *td; { struct thread *td = curthread; /* XXX */ struct vnode *vp; diff --git a/sys/fs/hpfs/hpfs_vfsops.c b/sys/fs/hpfs/hpfs_vfsops.c index e9059d4e..1459ed8 100644 --- a/sys/fs/hpfs/hpfs_vfsops.c +++ b/sys/fs/hpfs/hpfs_vfsops.c @@ -300,7 +300,7 @@ hpfs_mountfs(devvp, mp, argsp, td) goto failed; } - error = hpfs_root(mp, &vp); + error = hpfs_root(mp, &vp, td); if (error) { hpfs_cpdeinit(hpmp); hpfs_bmdeinit(hpmp); @@ -344,7 +344,7 @@ hpfs_unmount( dprintf(("hpfs_unmount: vflushing...\n")); - error = vflush(mp, 0, flags); + error = vflush(mp, 0, flags, td); if (error) { printf("hpfs_unmount: vflush failed: %d\n",error); return (error); @@ -371,7 +371,8 @@ hpfs_unmount( static int hpfs_root( struct mount *mp, - struct vnode **vpp ) + struct vnode **vpp, + struct thread *td ) { int error = 0; struct hpfsmount *hpmp = VFSTOHPFS(mp); diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 013ec7a..ee6c507 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -91,7 +91,8 @@ static MALLOC_DEFINE(M_MSDOSFSFAT, "MSDOSFS FAT", "MSDOSFS file allocation table struct iconv_functions *msdosfs_iconv = NULL; -static int update_mp(struct mount *mp, struct msdosfs_args *argp); +static int update_mp(struct mount *mp, struct msdosfs_args *argp, + struct thread *td); static int mountmsdosfs(struct vnode *devvp, struct mount *mp, struct thread *td, struct msdosfs_args *argp); static vfs_fhtovp_t msdosfs_fhtovp; @@ -103,9 +104,10 @@ static vfs_unmount_t msdosfs_unmount; static vfs_vptofh_t msdosfs_vptofh; static int -update_mp(mp, argp) +update_mp(mp, argp, td) struct mount *mp; struct msdosfs_args *argp; + struct thread *td; { struct msdosfsmount *pmp = VFSTOMSDOSFS(mp); int error; @@ -139,7 +141,7 @@ update_mp(mp, argp) if (FAT32(pmp)) pmp->pm_flags |= MSDOSFSMNT_LONGNAME; else { - if ((error = msdosfs_root(mp, &rootvp)) != 0) + if ((error = msdosfs_root(mp, &rootvp, td)) != 0) return error; pmp->pm_flags |= findwin95(VTODE(rootvp)) ? MSDOSFSMNT_LONGNAME @@ -187,7 +189,7 @@ msdosfs_mount(mp, path, data, ndp, td) flags = WRITECLOSE; if (mp->mnt_flag & MNT_FORCE) flags |= FORCECLOSE; - error = vflush(mp, 0, flags); + error = vflush(mp, 0, flags, td); } if (!error && (mp->mnt_flag & MNT_RELOAD)) /* not yet implemented */ @@ -282,7 +284,7 @@ msdosfs_mount(mp, path, data, ndp, td) return (error); } - error = update_mp(mp, &args); + error = update_mp(mp, &args, td); if (error) { msdosfs_unmount(mp, MNT_FORCE, td); return error; @@ -674,7 +676,7 @@ msdosfs_unmount(mp, mntflags, td) flags = 0; if (mntflags & MNT_FORCE) flags |= FORCECLOSE; - error = vflush(mp, 0, flags); + error = vflush(mp, 0, flags, td); if (error) return error; pmp = VFSTOMSDOSFS(mp); @@ -741,9 +743,10 @@ msdosfs_unmount(mp, mntflags, td) } static int -msdosfs_root(mp, vpp) +msdosfs_root(mp, vpp, td) struct mount *mp; struct vnode **vpp; + struct thread *td; { struct msdosfsmount *pmp = VFSTOMSDOSFS(mp); struct denode *ndep; diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c index 924f06f..7db1a13 100644 --- a/sys/fs/ntfs/ntfs_vfsops.c +++ b/sys/fs/ntfs/ntfs_vfsops.c @@ -457,7 +457,7 @@ out1: for(i=0;i<NTFS_SYSNODESNUM;i++) if(ntmp->ntm_sysvn[i]) vrele(ntmp->ntm_sysvn[i]); - if (vflush(mp, 0, 0)) + if (vflush(mp, 0, 0, td)) dprintf(("ntfs_mountfs: vflush failed\n")); out: @@ -487,7 +487,7 @@ ntfs_unmount( flags |= FORCECLOSE; dprintf(("ntfs_unmount: vflushing...\n")); - error = vflush(mp, 0, flags | SKIPSYSTEM); + error = vflush(mp, 0, flags | SKIPSYSTEM, td); if (error) { printf("ntfs_unmount: vflush failed: %d\n",error); return (error); @@ -503,7 +503,7 @@ ntfs_unmount( if(ntmp->ntm_sysvn[i]) vrele(ntmp->ntm_sysvn[i]); /* vflush system vnodes */ - error = vflush(mp, 0, flags); + error = vflush(mp, 0, flags, td); if (error) printf("ntfs_unmount: vflush failed(sysnodes): %d\n",error); @@ -538,7 +538,8 @@ ntfs_unmount( static int ntfs_root( struct mount *mp, - struct vnode **vpp ) + struct vnode **vpp, + struct thread *td ) { struct vnode *nvp; int error = 0; diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 0ecfda2..25c1651 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -228,7 +228,7 @@ nullfs_unmount(mp, mntflags, td) flags |= FORCECLOSE; /* There is 1 extra root vnode reference (nullm_rootvp). */ - error = vflush(mp, 1, flags); + error = vflush(mp, 1, flags, td); if (error) return (error); @@ -242,11 +242,11 @@ nullfs_unmount(mp, mntflags, td) } static int -nullfs_root(mp, vpp) +nullfs_root(mp, vpp, td) struct mount *mp; struct vnode **vpp; + struct thread *td; { - struct thread *td = curthread; /* XXX */ struct vnode *vp; NULLFSDEBUG("nullfs_root(mp = %p, vp = %p->%p)\n", (void *)mp, diff --git a/sys/fs/nwfs/nwfs_vfsops.c b/sys/fs/nwfs/nwfs_vfsops.c index 3eb0f91..824ef4e 100644 --- a/sys/fs/nwfs/nwfs_vfsops.c +++ b/sys/fs/nwfs/nwfs_vfsops.c @@ -208,7 +208,7 @@ static int nwfs_mount(struct mount *mp, char *path, caddr_t data, /* protect against invalid mount points */ nmp->m.mount_point[sizeof(nmp->m.mount_point)-1] = '\0'; vfs_getnewfsid(mp); - error = nwfs_root(mp, &vp); + error = nwfs_root(mp, &vp, td); if (error) goto bad; /* @@ -238,7 +238,7 @@ nwfs_unmount(struct mount *mp, int mntflags, struct thread *td) if (mntflags & MNT_FORCE) flags |= FORCECLOSE; /* There is 1 extra root vnode reference from nwfs_mount(). */ - error = vflush(mp, 1, flags); + error = vflush(mp, 1, flags, td); if (error) return (error); conn = NWFSTOCONN(nmp); @@ -257,13 +257,12 @@ nwfs_unmount(struct mount *mp, int mntflags, struct thread *td) /* Return locked vnode to root of a filesystem */ static int -nwfs_root(struct mount *mp, struct vnode **vpp) { +nwfs_root(struct mount *mp, struct vnode **vpp, struct thread *td) { struct vnode *vp; struct nwmount *nmp; struct nwnode *np; struct ncp_conn *conn; struct nw_entry_info fattr; - struct thread *td = curthread; struct ucred *cred = td->td_ucred; int error, nsf, opt; u_char vol; diff --git a/sys/fs/portalfs/portal_vfsops.c b/sys/fs/portalfs/portal_vfsops.c index 497b65a..5354f8d 100644 --- a/sys/fs/portalfs/portal_vfsops.c +++ b/sys/fs/portalfs/portal_vfsops.c @@ -170,7 +170,7 @@ portal_unmount(mp, mntflags, td) return (EBUSY); #endif /* There is 1 extra root vnode reference (pm_root). */ - error = vflush(mp, 1, flags); + error = vflush(mp, 1, flags, td); if (error) return (error); @@ -194,9 +194,10 @@ portal_unmount(mp, mntflags, td) } static int -portal_root(mp, vpp) +portal_root(mp, vpp, td) struct mount *mp; struct vnode **vpp; + struct thread *td; { struct thread *td = curthread; /* XXX */ struct vnode *vp; diff --git a/sys/fs/pseudofs/pseudofs.c b/sys/fs/pseudofs/pseudofs.c index 4db02b4..872bd8d 100644 --- a/sys/fs/pseudofs/pseudofs.c +++ b/sys/fs/pseudofs/pseudofs.c @@ -295,7 +295,7 @@ pfs_unmount(struct mount *mp, int mntflags, struct thread *td) /* XXX do stuff with pi... */ - error = vflush(mp, 0, (mntflags & MNT_FORCE) ? FORCECLOSE : 0); + error = vflush(mp, 0, (mntflags & MNT_FORCE) ? FORCECLOSE : 0, td); return (error); } @@ -303,7 +303,7 @@ pfs_unmount(struct mount *mp, int mntflags, struct thread *td) * Return a root vnode */ int -pfs_root(struct mount *mp, struct vnode **vpp) +pfs_root(struct mount *mp, struct vnode **vpp, struct thread *td) { struct pfs_info *pi; diff --git a/sys/fs/pseudofs/pseudofs.h b/sys/fs/pseudofs/pseudofs.h index 2d44811..1bac49c 100644 --- a/sys/fs/pseudofs/pseudofs.h +++ b/sys/fs/pseudofs/pseudofs.h @@ -201,7 +201,8 @@ int pfs_mount (struct pfs_info *pi, struct mount *mp, struct nameidata *ndp, struct thread *td); int pfs_unmount (struct mount *mp, int mntflags, struct thread *td); -int pfs_root (struct mount *mp, struct vnode **vpp); +int pfs_root (struct mount *mp, struct vnode **vpp, + struct thread *td); int pfs_statfs (struct mount *mp, struct statfs *sbp, struct thread *td); int pfs_init (struct pfs_info *pi, struct vfsconf *vfc); diff --git a/sys/fs/smbfs/smbfs_vfsops.c b/sys/fs/smbfs/smbfs_vfsops.c index e4575ec..2004097 100644 --- a/sys/fs/smbfs/smbfs_vfsops.c +++ b/sys/fs/smbfs/smbfs_vfsops.c @@ -189,7 +189,7 @@ smbfs_mount(struct mount *mp, char *path, caddr_t data, /* protect against invalid mount points */ smp->sm_args.mount_point[sizeof(smp->sm_args.mount_point) - 1] = '\0'; vfs_getnewfsid(mp); - error = smbfs_root(mp, &vp); + error = smbfs_root(mp, &vp, td); if (error) goto bad; VOP_UNLOCK(vp, 0, td); @@ -238,7 +238,7 @@ smbfs_unmount(struct mount *mp, int mntflags, struct thread *td) do { smp->sm_didrele = 0; /* There is 1 extra root vnode reference from smbfs_mount(). */ - error = vflush(mp, 1, flags); + error = vflush(mp, 1, flags, td); } while (error == EBUSY && smp->sm_didrele != 0); if (error) return error; @@ -262,7 +262,7 @@ smbfs_unmount(struct mount *mp, int mntflags, struct thread *td) * Return locked root vnode of a filesystem */ static int -smbfs_root(struct mount *mp, struct vnode **vpp) +smbfs_root(struct mount *mp, struct vnode **vpp, struct thread *td) { struct smbmount *smp = VFSTOSMBFS(mp); struct vnode *vp; diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c index d520c08..2b2501a 100644 --- a/sys/fs/udf/udf_vfsops.c +++ b/sys/fs/udf/udf_vfsops.c @@ -501,7 +501,7 @@ udf_unmount(struct mount *mp, int mntflags, struct thread *td) if (mntflags & MNT_FORCE) flags |= FORCECLOSE; - if ((error = vflush(mp, 0, flags))) + if ((error = vflush(mp, 0, flags, td))) return (error); if (udfmp->im_flags & UDFMNT_KICONV && udf_iconv) { @@ -532,7 +532,7 @@ udf_unmount(struct mount *mp, int mntflags, struct thread *td) } static int -udf_root(struct mount *mp, struct vnode **vpp) +udf_root(struct mount *mp, struct vnode **vpp, struct thread *td) { struct udf_mnt *udfmp; struct vnode *vp; diff --git a/sys/fs/umapfs/umap_vfsops.c b/sys/fs/umapfs/umap_vfsops.c index 1d7d0e5..c6f0e57 100644 --- a/sys/fs/umapfs/umap_vfsops.c +++ b/sys/fs/umapfs/umap_vfsops.c @@ -279,7 +279,7 @@ umapfs_unmount(mp, mntflags, td) return (EBUSY); #endif /* There is 1 extra root vnode reference (umapm_rootvp). */ - error = vflush(mp, 1, flags); + error = vflush(mp, 1, flags, td); if (error) return (error); @@ -292,9 +292,10 @@ umapfs_unmount(mp, mntflags, td) } static int -umapfs_root(mp, vpp) +umapfs_root(mp, vpp, td) struct mount *mp; struct vnode **vpp; + struct thread *td; { struct thread *td = curthread; /* XXX */ struct vnode *vp; diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c index 6163257..e756e18 100644 --- a/sys/fs/unionfs/union_vfsops.c +++ b/sys/fs/unionfs/union_vfsops.c @@ -342,7 +342,7 @@ union_unmount(mp, mntflags, td) * (d) times, where (d) is the maximum tree depth * in the filesystem. */ - for (freeing = 0; (error = vflush(mp, 0, flags)) != 0;) { + for (freeing = 0; (error = vflush(mp, 0, flags, td)) != 0;) { int n; /* count #vnodes held on mount list */ @@ -378,9 +378,10 @@ union_unmount(mp, mntflags, td) } static int -union_root(mp, vpp) +union_root(mp, vpp, td) struct mount *mp; struct vnode **vpp; + struct thread *td; { struct union_mount *um = MOUNTTOUNIONMOUNT(mp); int error; diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 1934d5d..c8240e9 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -268,7 +268,7 @@ union_lookup1(udvp, pdvp, vpp, cnp) relock_pdvp = 1; vput(dvp); dvp = NULL; - error = VFS_ROOT(mp, &dvp); + error = VFS_ROOT(mp, &dvp, td); vfs_unbusy(mp, td); |