summaryrefslogtreecommitdiffstats
path: root/sys/fs/tmpfs/tmpfs_subr.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2009-05-11 15:33:26 +0000
committerattilio <attilio@FreeBSD.org>2009-05-11 15:33:26 +0000
commit1dcb84131b6679f5d53452314d4ca1dfe2d8c5f0 (patch)
tree6591f00318da636f44a6ceb26f517e7795eb1b44 /sys/fs/tmpfs/tmpfs_subr.c
parentebcb20267286e4ffadb3f603af56bd7a1df1f422 (diff)
downloadFreeBSD-src-1dcb84131b6679f5d53452314d4ca1dfe2d8c5f0.zip
FreeBSD-src-1dcb84131b6679f5d53452314d4ca1dfe2d8c5f0.tar.gz
Remove the thread argument from the FSD (File-System Dependent) parts of
the VFS. Now all the VFS_* functions and relating parts don't want the context as long as it always refers to curthread. In some points, in particular when dealing with VOPs and functions living in the same namespace (eg. vflush) which still need to be converted, pass curthread explicitly in order to retain the old behaviour. Such loose ends will be fixed ASAP. While here fix a bug: now, UFS_EXTATTR can be compiled alone without the UFS_EXTATTR_AUTOSTART option. VFS KPI is heavilly changed by this commit so thirdy parts modules needs to be recompiled. Bump __FreeBSD_version in order to signal such situation.
Diffstat (limited to 'sys/fs/tmpfs/tmpfs_subr.c')
-rw-r--r--sys/fs/tmpfs/tmpfs_subr.c12
1 files changed, 5 insertions, 7 deletions
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);
OpenPOWER on IntegriCloud