diff options
Diffstat (limited to 'sys/fs/tmpfs')
-rw-r--r-- | sys/fs/tmpfs/tmpfs.h | 4 | ||||
-rw-r--r-- | sys/fs/tmpfs/tmpfs_subr.c | 12 | ||||
-rw-r--r-- | sys/fs/tmpfs/tmpfs_vfsops.c | 25 | ||||
-rw-r--r-- | sys/fs/tmpfs/tmpfs_vnops.c | 9 |
4 files changed, 23 insertions, 27 deletions
diff --git a/sys/fs/tmpfs/tmpfs.h b/sys/fs/tmpfs/tmpfs.h index 1ae8ca6..ffd705f 100644 --- a/sys/fs/tmpfs/tmpfs.h +++ b/sys/fs/tmpfs/tmpfs.h @@ -394,14 +394,14 @@ struct tmpfs_fid { int tmpfs_alloc_node(struct tmpfs_mount *, enum vtype, uid_t uid, gid_t gid, mode_t mode, struct tmpfs_node *, - char *, dev_t, struct thread *, struct tmpfs_node **); + char *, dev_t, struct tmpfs_node **); void tmpfs_free_node(struct tmpfs_mount *, struct tmpfs_node *); int tmpfs_alloc_dirent(struct tmpfs_mount *, struct tmpfs_node *, const char *, uint16_t, struct tmpfs_dirent **); void tmpfs_free_dirent(struct tmpfs_mount *, struct tmpfs_dirent *, boolean_t); int tmpfs_alloc_vp(struct mount *, struct tmpfs_node *, int, - struct vnode **, struct thread *); + struct vnode **); void tmpfs_free_vp(struct vnode *); int tmpfs_alloc_file(struct vnode *, struct vnode **, struct vattr *, struct componentname *, char *); diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index 3e5adf7..f2be735 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -82,7 +82,7 @@ __FBSDID("$FreeBSD$"); int tmpfs_alloc_node(struct tmpfs_mount *tmp, enum vtype type, uid_t uid, gid_t gid, mode_t mode, struct tmpfs_node *parent, - char *target, dev_t rdev, struct thread *p, struct tmpfs_node **node) + char *target, dev_t rdev, struct tmpfs_node **node) { struct tmpfs_node *nnode; @@ -303,7 +303,7 @@ tmpfs_free_dirent(struct tmpfs_mount *tmp, struct tmpfs_dirent *de, */ int tmpfs_alloc_vp(struct mount *mp, struct tmpfs_node *node, int lkflag, - struct vnode **vpp, struct thread *td) + struct vnode **vpp) { int error = 0; struct vnode *vp; @@ -314,7 +314,7 @@ loop: VI_LOCK(vp); TMPFS_NODE_UNLOCK(node); vholdl(vp); - (void) vget(vp, lkflag | LK_INTERLOCK | LK_RETRY, td); + (void) vget(vp, lkflag | LK_INTERLOCK | LK_RETRY, curthread); vdrop(vp); /* @@ -482,8 +482,7 @@ tmpfs_alloc_file(struct vnode *dvp, struct vnode **vpp, struct vattr *vap, /* Allocate a node that represents the new file. */ error = tmpfs_alloc_node(tmp, vap->va_type, cnp->cn_cred->cr_uid, - dnode->tn_gid, vap->va_mode, parent, target, vap->va_rdev, - cnp->cn_thread, &node); + dnode->tn_gid, vap->va_mode, parent, target, vap->va_rdev, &node); if (error != 0) goto out; @@ -496,8 +495,7 @@ tmpfs_alloc_file(struct vnode *dvp, struct vnode **vpp, struct vattr *vap, } /* Allocate a vnode for the new file. */ - error = tmpfs_alloc_vp(dvp->v_mount, node, LK_EXCLUSIVE, vpp, - cnp->cn_thread); + error = tmpfs_alloc_vp(dvp->v_mount, node, LK_EXCLUSIVE, vpp); if (error != 0) { tmpfs_free_dirent(tmp, de, TRUE); tmpfs_free_node(tmp, node); diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c index 264e19f..f0ae6be 100644 --- a/sys/fs/tmpfs/tmpfs_vfsops.c +++ b/sys/fs/tmpfs/tmpfs_vfsops.c @@ -68,12 +68,11 @@ MALLOC_DEFINE(M_TMPFSNAME, "tmpfs name", "tmpfs file names"); /* --------------------------------------------------------------------- */ -static int tmpfs_mount(struct mount *, struct thread *); -static int tmpfs_unmount(struct mount *, int, struct thread *); -static int tmpfs_root(struct mount *, int flags, struct vnode **, - struct thread *); +static int tmpfs_mount(struct mount *); +static int tmpfs_unmount(struct mount *, int); +static int tmpfs_root(struct mount *, int flags, struct vnode **); static int tmpfs_fhtovp(struct mount *, struct fid *, struct vnode **); -static int tmpfs_statfs(struct mount *, struct statfs *, struct thread *); +static int tmpfs_statfs(struct mount *, struct statfs *); /* --------------------------------------------------------------------- */ @@ -178,7 +177,7 @@ tmpfs_node_fini(void *mem, int size) } static int -tmpfs_mount(struct mount *mp, struct thread *td) +tmpfs_mount(struct mount *mp) { struct tmpfs_mount *tmp; struct tmpfs_node *root; @@ -278,7 +277,7 @@ tmpfs_mount(struct mount *mp, struct thread *td) /* Allocate the root node. */ error = tmpfs_alloc_node(tmp, VDIR, root_uid, root_gid, root_mode & ALLPERMS, NULL, NULL, - VNOVAL, td, &root); + VNOVAL, &root); if (error != 0 || root == NULL) { uma_zdestroy(tmp->tm_node_pool); @@ -307,7 +306,7 @@ tmpfs_mount(struct mount *mp, struct thread *td) /* ARGSUSED2 */ static int -tmpfs_unmount(struct mount *mp, int mntflags, struct thread *l) +tmpfs_unmount(struct mount *mp, int mntflags) { int error; int flags = 0; @@ -319,7 +318,7 @@ tmpfs_unmount(struct mount *mp, int mntflags, struct thread *l) flags |= FORCECLOSE; /* Finalize all pending I/O. */ - error = vflush(mp, 0, flags, l); + error = vflush(mp, 0, flags, curthread); if (error != 0) return error; @@ -374,10 +373,10 @@ tmpfs_unmount(struct mount *mp, int mntflags, struct thread *l) /* --------------------------------------------------------------------- */ static int -tmpfs_root(struct mount *mp, int flags, struct vnode **vpp, struct thread *td) +tmpfs_root(struct mount *mp, int flags, struct vnode **vpp) { int error; - error = tmpfs_alloc_vp(mp, VFS_TO_TMPFS(mp)->tm_root, flags, vpp, td); + error = tmpfs_alloc_vp(mp, VFS_TO_TMPFS(mp)->tm_root, flags, vpp); if (!error) (*vpp)->v_vflag |= VV_ROOT; @@ -417,7 +416,7 @@ tmpfs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) TMPFS_UNLOCK(tmp); if (found) - return (tmpfs_alloc_vp(mp, node, LK_EXCLUSIVE, vpp, curthread)); + return (tmpfs_alloc_vp(mp, node, LK_EXCLUSIVE, vpp)); return (EINVAL); } @@ -426,7 +425,7 @@ tmpfs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) /* ARGSUSED2 */ static int -tmpfs_statfs(struct mount *mp, struct statfs *sbp, struct thread *l) +tmpfs_statfs(struct mount *mp, struct statfs *sbp) { fsfilcnt_t freenodes; struct tmpfs_mount *tmp; diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 16dad1b..64114fa 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -67,7 +67,6 @@ tmpfs_lookup(struct vop_cachedlookup_args *v) struct vnode *dvp = v->a_dvp; struct vnode **vpp = v->a_vpp; struct componentname *cnp = v->a_cnp; - struct thread *td = cnp->cn_thread; int error; struct tmpfs_dirent *de; @@ -77,7 +76,7 @@ tmpfs_lookup(struct vop_cachedlookup_args *v) *vpp = NULLVP; /* Check accessibility of requested node as a first step. */ - error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, td); + error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, cnp->cn_thread); if (error != 0) goto out; @@ -94,7 +93,7 @@ tmpfs_lookup(struct vop_cachedlookup_args *v) VOP_UNLOCK(dvp, 0); /* Allocate a new vnode on the matching entry. */ error = tmpfs_alloc_vp(dvp->v_mount, dnode->tn_dir.tn_parent, - cnp->cn_lkflags, vpp, td); + cnp->cn_lkflags, vpp); vn_lock(dvp, ltype | LK_RETRY); vdrop(dvp); @@ -155,7 +154,7 @@ tmpfs_lookup(struct vop_cachedlookup_args *v) /* Allocate a new vnode on the matching entry. */ error = tmpfs_alloc_vp(dvp->v_mount, tnode, - cnp->cn_lkflags, vpp, td); + cnp->cn_lkflags, vpp); if (error != 0) goto out; @@ -170,7 +169,7 @@ tmpfs_lookup(struct vop_cachedlookup_args *v) cnp->cn_flags |= SAVENAME; } else { error = tmpfs_alloc_vp(dvp->v_mount, tnode, - cnp->cn_lkflags, vpp, td); + cnp->cn_lkflags, vpp); } } } |