diff options
Diffstat (limited to 'sys/gnu')
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vfsops.c | 23 | ||||
-rw-r--r-- | sys/gnu/fs/reiserfs/reiserfs_vfsops.c | 19 | ||||
-rw-r--r-- | sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c | 29 |
3 files changed, 33 insertions, 38 deletions
diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index 5f4a84a..c8d79fb 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -127,12 +127,12 @@ static const char *ext2_opts[] = { "from", "export", "acls", "noexec", * mount system call */ static int -ext2_mount(mp, td) +ext2_mount(mp) struct mount *mp; - struct thread *td; { struct vfsoptlist *opts; struct vnode *devvp; + struct thread *td; struct ext2mount *ump = 0; struct ext2_sb_info *fs; char *path, *fspec; @@ -140,6 +140,7 @@ ext2_mount(mp, td) accmode_t accmode; struct nameidata nd, *ndp = &nd; + td = curthread; opts = mp->mnt_optnew; if (vfs_filteropt(opts, ext2_opts)) @@ -165,7 +166,7 @@ ext2_mount(mp, td) error = 0; if (fs->s_rd_only == 0 && vfs_flagopt(opts, "ro", NULL, 0)) { - error = VFS_SYNC(mp, MNT_WAIT, td); + error = VFS_SYNC(mp, MNT_WAIT); if (error) return (error); flags = WRITECLOSE; @@ -734,10 +735,9 @@ out: * unmount system call */ static int -ext2_unmount(mp, mntflags, td) +ext2_unmount(mp, mntflags) struct mount *mp; int mntflags; - struct thread *td; { struct ext2mount *ump; struct ext2_sb_info *fs; @@ -749,7 +749,7 @@ ext2_unmount(mp, mntflags, td) return (EINVAL); flags |= FORCECLOSE; } - if ((error = ext2_flushfiles(mp, flags, td)) != 0) + if ((error = ext2_flushfiles(mp, flags, curthread)) != 0) return (error); ump = VFSTOEXT2(mp); fs = ump->um_e2fs; @@ -810,10 +810,9 @@ ext2_flushfiles(mp, flags, td) * taken from ext2/super.c ext2_statfs */ static int -ext2_statfs(mp, sbp, td) +ext2_statfs(mp, sbp) struct mount *mp; struct statfs *sbp; - struct thread *td; { unsigned long overhead; struct ext2mount *ump; @@ -862,17 +861,18 @@ ext2_statfs(mp, sbp, td) * Note: we are always called with the filesystem marked `MPBUSY'. */ static int -ext2_sync(mp, waitfor, td) +ext2_sync(mp, waitfor) struct mount *mp; int waitfor; - struct thread *td; { struct vnode *mvp, *vp; + struct thread *td; struct inode *ip; struct ext2mount *ump = VFSTOEXT2(mp); struct ext2_sb_info *fs; int error, allerror = 0; + td = curthread; fs = ump->um_e2fs; if (fs->s_dirt != 0 && fs->s_rd_only != 0) { /* XXX */ printf("fs = %s\n", fs->fs_fsmnt); @@ -1143,11 +1143,10 @@ printf("\nupdating superblock, waitfor=%s\n", waitfor == MNT_WAIT ? "yes":"no"); * Return the root of a filesystem. */ static int -ext2_root(mp, flags, vpp, td) +ext2_root(mp, flags, vpp) struct mount *mp; int flags; struct vnode **vpp; - struct thread *td; { struct vnode *nvp; int error; diff --git a/sys/gnu/fs/reiserfs/reiserfs_vfsops.c b/sys/gnu/fs/reiserfs/reiserfs_vfsops.c index 6704b07..739eff9 100644 --- a/sys/gnu/fs/reiserfs/reiserfs_vfsops.c +++ b/sys/gnu/fs/reiserfs/reiserfs_vfsops.c @@ -49,7 +49,7 @@ MALLOC_DEFINE(M_REISERFSNODE, "reiserfs_node", "ReiserFS vnode private part"); * -------------------------------------------------------------------*/ static int -reiserfs_cmount(struct mntarg *ma, void *data, int flags, struct thread *td) +reiserfs_cmount(struct mntarg *ma, void *data, int flags) { struct reiserfs_args args; int error; @@ -70,7 +70,7 @@ reiserfs_cmount(struct mntarg *ma, void *data, int flags, struct thread *td) * Mount system call */ static int -reiserfs_mount(struct mount *mp, struct thread *td) +reiserfs_mount(struct mount *mp) { size_t size; int error, len; @@ -81,7 +81,9 @@ reiserfs_mount(struct mount *mp, struct thread *td) struct reiserfs_mount *rmp; struct reiserfs_sb_info *sbi; struct nameidata nd, *ndp = &nd; + struct thread *td; + td = curthread; if (!(mp->mnt_flag & MNT_RDONLY)) return EROFS; @@ -158,7 +160,7 @@ reiserfs_mount(struct mount *mp, struct thread *td) reiserfs_log(LOG_DEBUG, "prepare statfs data\n"); (void)copystr(fspec, mp->mnt_stat.f_mntfromname, MNAMELEN - 1, &size); bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size); - (void)reiserfs_statfs(mp, &mp->mnt_stat, td); + (void)reiserfs_statfs(mp, &mp->mnt_stat); reiserfs_log(LOG_DEBUG, "done\n"); return (0); @@ -168,7 +170,7 @@ reiserfs_mount(struct mount *mp, struct thread *td) * Unmount system call */ static int -reiserfs_unmount(struct mount *mp, int mntflags, struct thread *td) +reiserfs_unmount(struct mount *mp, int mntflags) { int error, flags = 0; struct reiserfs_mount *rmp; @@ -185,7 +187,7 @@ reiserfs_unmount(struct mount *mp, int mntflags, struct thread *td) /* Flush files -> vflush */ reiserfs_log(LOG_DEBUG, "flush vnodes\n"); - if ((error = vflush(mp, 0, flags, td))) + if ((error = vflush(mp, 0, flags, curthread))) return (error); /* XXX Super block update */ @@ -252,8 +254,7 @@ reiserfs_unmount(struct mount *mp, int mntflags, struct thread *td) * Return the root of a filesystem. */ static int -reiserfs_root(struct mount *mp, int flags, struct vnode **vpp, - struct thread *td) +reiserfs_root(struct mount *mp, int flags, struct vnode **vpp) { int error; struct vnode *vp; @@ -262,7 +263,7 @@ reiserfs_root(struct mount *mp, int flags, struct vnode **vpp, rootkey.on_disk_key.k_dir_id = REISERFS_ROOT_PARENT_OBJECTID; rootkey.on_disk_key.k_objectid = REISERFS_ROOT_OBJECTID; - error = reiserfs_iget(mp, &rootkey, &vp, td); + error = reiserfs_iget(mp, &rootkey, &vp, curthread); if (error == 0) *vpp = vp; @@ -273,7 +274,7 @@ reiserfs_root(struct mount *mp, int flags, struct vnode **vpp, * The statfs syscall */ static int -reiserfs_statfs(struct mount *mp, struct statfs *sbp, struct thread *td) +reiserfs_statfs(struct mount *mp, struct statfs *sbp) { struct reiserfs_mount *rmp; struct reiserfs_sb_info *sbi; diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c b/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c index 1374fa5..f89618e 100644 --- a/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c +++ b/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c @@ -180,8 +180,7 @@ _xfs_param_copyin(struct mount *mp, struct thread *td) } static int -_xfs_mount(struct mount *mp, - struct thread *td) +_xfs_mount(struct mount *mp) { struct xfsmount *xmp; struct xfs_vnode *rootvp; @@ -189,8 +188,10 @@ _xfs_mount(struct mount *mp, struct vnode *rvp, *devvp; struct cdev *ddev; struct g_consumer *cp; + struct thread *td; int error; + td = curthread; ddev = NULL; cp = NULL; @@ -229,7 +230,7 @@ _xfs_mount(struct mount *mp, mp->mnt_stat.f_fsid.val[0] = dev2udev(ddev); mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum; - if ((error = VFS_STATFS(mp, &mp->mnt_stat, td)) != 0) + if ((error = VFS_STATFS(mp, &mp->mnt_stat)) != 0) goto fail_unmount; rvp = rootvp->v_vnode; @@ -263,10 +264,9 @@ _xfs_mount(struct mount *mp, * Free reference to null layer */ static int -_xfs_unmount(mp, mntflags, td) +_xfs_unmount(mp, mntflags) struct mount *mp; int mntflags; - struct thread *td; { struct vnode *devvp; struct g_consumer *cp; @@ -278,7 +278,7 @@ _xfs_unmount(mp, mntflags, td) if (devvp != NULL) cp = devvp->v_bufobj.bo_private; - XVFS_UNMOUNT(MNTTOVFS(mp), 0, td->td_ucred, error); + XVFS_UNMOUNT(MNTTOVFS(mp), 0, curthread->td_ucred, error); if (error == 0) { if (cp != NULL) { DROP_GIANT(); @@ -292,11 +292,10 @@ _xfs_unmount(mp, mntflags, td) } static int -_xfs_root(mp, flags, vpp, td) +_xfs_root(mp, flags, vpp) struct mount *mp; int flags; struct vnode **vpp; - struct thread *td; { xfs_vnode_t *vp; int error; @@ -310,22 +309,20 @@ _xfs_root(mp, flags, vpp, td) } static int -_xfs_quotactl(mp, cmd, uid, arg, td) +_xfs_quotactl(mp, cmd, uid, arg) struct mount *mp; int cmd; uid_t uid; void *arg; - struct thread *td; { printf("xfs_quotactl\n"); return EOPNOTSUPP; } static int -_xfs_statfs(mp, sbp, td) +_xfs_statfs(mp, sbp) struct mount *mp; struct statfs *sbp; - struct thread *td; { int error; @@ -340,10 +337,9 @@ _xfs_statfs(mp, sbp, td) } static int -_xfs_sync(mp, waitfor, td) +_xfs_sync(mp, waitfor) struct mount *mp; int waitfor; - struct thread *td; { int error; int flags = SYNC_FSDATA|SYNC_ATTR|SYNC_REFCACHE; @@ -352,7 +348,7 @@ _xfs_sync(mp, waitfor, td) flags |= SYNC_WAIT; else if (waitfor == MNT_LAZY) flags |= SYNC_BDFLUSH; - XVFS_SYNC(MNTTOVFS(mp), flags, td->td_ucred, error); + XVFS_SYNC(MNTTOVFS(mp), flags, curthread->td_ucred, error); return (error); } @@ -386,8 +382,7 @@ _xfs_fhtovp(mp, fidp, vpp) static int _xfs_extattrctl(struct mount *mp, int cm, struct vnode *filename_v, - int attrnamespace, const char *attrname, - struct thread *td) + int attrnamespace, const char *attrname) { printf("xfs_extattrctl\n"); return ENOSYS; |