aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/tmpfs
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2008-02-25 18:45:57 +0000
committerAttilio Rao <attilio@FreeBSD.org>2008-02-25 18:45:57 +0000
commit81c794f9983314f28ba954fb5e8982c61eb43569 (patch)
treed455fa541ca0d9b761f28e9c67c92fd959e44b2c /sys/fs/tmpfs
parentc32951b16ee254477b29e0168a17b13f6fb2f5da (diff)
downloadsrc-81c794f9983314f28ba954fb5e8982c61eb43569.tar.gz
src-81c794f9983314f28ba954fb5e8982c61eb43569.zip
Axe the 'thread' argument from VOP_ISLOCKED() and lockstatus() as it is
always curthread. As KPI gets broken by this patch, manpages and __FreeBSD_version will be updated by further commits. Tested by: Andrea Barberio <insomniac at slackware dot it>
Notes
Notes: svn path=/head/; revision=176559
Diffstat (limited to 'sys/fs/tmpfs')
-rw-r--r--sys/fs/tmpfs/tmpfs_subr.c24
-rw-r--r--sys/fs/tmpfs/tmpfs_vnops.c36
2 files changed, 30 insertions, 30 deletions
diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c
index 0dadf8ace4a0..cc1b75fc6a0b 100644
--- a/sys/fs/tmpfs/tmpfs_subr.c
+++ b/sys/fs/tmpfs/tmpfs_subr.c
@@ -414,7 +414,7 @@ unlock:
out:
*vpp = vp;
- MPASS(IFF(error == 0, *vpp != NULL && VOP_ISLOCKED(*vpp, td)));
+ MPASS(IFF(error == 0, *vpp != NULL && VOP_ISLOCKED(*vpp)));
#ifdef INVARIANTS
TMPFS_NODE_LOCK(node);
MPASS(*vpp == node->tn_vnode);
@@ -466,7 +466,7 @@ tmpfs_alloc_file(struct vnode *dvp, struct vnode **vpp, struct vattr *vap,
struct tmpfs_node *node;
struct tmpfs_node *parent;
- MPASS(VOP_ISLOCKED(dvp, cnp->cn_thread));
+ MPASS(VOP_ISLOCKED(dvp));
MPASS(cnp->cn_flags & HASBUF);
tmp = VFS_TO_TMPFS(dvp->v_mount);
@@ -933,7 +933,7 @@ tmpfs_chflags(struct vnode *vp, int flags, struct ucred *cred, struct thread *p)
int error;
struct tmpfs_node *node;
- MPASS(VOP_ISLOCKED(vp, p));
+ MPASS(VOP_ISLOCKED(vp));
node = VP_TO_TMPFS_NODE(vp);
@@ -975,7 +975,7 @@ tmpfs_chflags(struct vnode *vp, int flags, struct ucred *cred, struct thread *p)
}
node->tn_status |= TMPFS_NODE_CHANGED;
- MPASS(VOP_ISLOCKED(vp, p));
+ MPASS(VOP_ISLOCKED(vp));
return 0;
}
@@ -993,7 +993,7 @@ tmpfs_chmod(struct vnode *vp, mode_t mode, struct ucred *cred, struct thread *p)
int error;
struct tmpfs_node *node;
- MPASS(VOP_ISLOCKED(vp, p));
+ MPASS(VOP_ISLOCKED(vp));
node = VP_TO_TMPFS_NODE(vp);
@@ -1033,7 +1033,7 @@ tmpfs_chmod(struct vnode *vp, mode_t mode, struct ucred *cred, struct thread *p)
node->tn_status |= TMPFS_NODE_CHANGED;
- MPASS(VOP_ISLOCKED(vp, p));
+ MPASS(VOP_ISLOCKED(vp));
return 0;
}
@@ -1056,7 +1056,7 @@ tmpfs_chown(struct vnode *vp, uid_t uid, gid_t gid, struct ucred *cred,
uid_t ouid;
gid_t ogid;
- MPASS(VOP_ISLOCKED(vp, p));
+ MPASS(VOP_ISLOCKED(vp));
node = VP_TO_TMPFS_NODE(vp);
@@ -1106,7 +1106,7 @@ tmpfs_chown(struct vnode *vp, uid_t uid, gid_t gid, struct ucred *cred,
node->tn_mode &= ~(S_ISUID | S_ISGID);
}
- MPASS(VOP_ISLOCKED(vp, p));
+ MPASS(VOP_ISLOCKED(vp));
return 0;
}
@@ -1125,7 +1125,7 @@ tmpfs_chsize(struct vnode *vp, u_quad_t size, struct ucred *cred,
int error;
struct tmpfs_node *node;
- MPASS(VOP_ISLOCKED(vp, p));
+ MPASS(VOP_ISLOCKED(vp));
node = VP_TO_TMPFS_NODE(vp);
@@ -1163,7 +1163,7 @@ tmpfs_chsize(struct vnode *vp, u_quad_t size, struct ucred *cred,
/* tmpfs_truncate will raise the NOTE_EXTEND and NOTE_ATTRIB kevents
* for us, as will update tn_status; no need to do that here. */
- MPASS(VOP_ISLOCKED(vp, p));
+ MPASS(VOP_ISLOCKED(vp));
return error;
}
@@ -1182,7 +1182,7 @@ tmpfs_chtimes(struct vnode *vp, struct timespec *atime, struct timespec *mtime,
int error;
struct tmpfs_node *node;
- MPASS(VOP_ISLOCKED(vp, l));
+ MPASS(VOP_ISLOCKED(vp));
node = VP_TO_TMPFS_NODE(vp);
@@ -1217,7 +1217,7 @@ tmpfs_chtimes(struct vnode *vp, struct timespec *atime, struct timespec *mtime,
if (birthtime->tv_nsec != VNOVAL && birthtime->tv_nsec != VNOVAL)
node->tn_birthtime = *birthtime;
- MPASS(VOP_ISLOCKED(vp, l));
+ MPASS(VOP_ISLOCKED(vp));
return 0;
}
diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c
index a0b4b84d5343..ff466ab6ac89 100644
--- a/sys/fs/tmpfs/tmpfs_vnops.c
+++ b/sys/fs/tmpfs/tmpfs_vnops.c
@@ -97,7 +97,7 @@ tmpfs_lookup(struct vop_cachedlookup_args *v)
if (cnp->cn_flags & ISDOTDOT) {
int ltype = 0;
- ltype = VOP_ISLOCKED(dvp, td);
+ ltype = VOP_ISLOCKED(dvp);
vhold(dvp);
VOP_UNLOCK(dvp, 0);
/* Allocate a new vnode on the matching entry. */
@@ -192,7 +192,7 @@ tmpfs_lookup(struct vop_cachedlookup_args *v)
out:
/* If there were no errors, *vpp cannot be null and it must be
* locked. */
- MPASS(IFF(error == 0, *vpp != NULLVP && VOP_ISLOCKED(*vpp, td)));
+ MPASS(IFF(error == 0, *vpp != NULLVP && VOP_ISLOCKED(*vpp)));
return error;
}
@@ -239,7 +239,7 @@ tmpfs_open(struct vop_open_args *v)
int error;
struct tmpfs_node *node;
- MPASS(VOP_ISLOCKED(vp, v->a_td));
+ MPASS(VOP_ISLOCKED(vp));
node = VP_TO_TMPFS_NODE(vp);
@@ -257,7 +257,7 @@ tmpfs_open(struct vop_open_args *v)
vnode_create_vobject(vp, node->tn_size, v->a_td);
}
- MPASS(VOP_ISLOCKED(vp, v->a_td));
+ MPASS(VOP_ISLOCKED(vp));
return error;
}
@@ -270,7 +270,7 @@ tmpfs_close(struct vop_close_args *v)
struct tmpfs_node *node;
- MPASS(VOP_ISLOCKED(vp, v->a_td));
+ MPASS(VOP_ISLOCKED(vp));
node = VP_TO_TMPFS_NODE(vp);
@@ -295,7 +295,7 @@ tmpfs_access(struct vop_access_args *v)
int error;
struct tmpfs_node *node;
- MPASS(VOP_ISLOCKED(vp, v->a_td));
+ MPASS(VOP_ISLOCKED(vp));
node = VP_TO_TMPFS_NODE(vp);
@@ -334,7 +334,7 @@ tmpfs_access(struct vop_access_args *v)
node->tn_gid, mode, cred, NULL);
out:
- MPASS(VOP_ISLOCKED(vp, v->a_td));
+ MPASS(VOP_ISLOCKED(vp));
return error;
}
@@ -394,7 +394,7 @@ tmpfs_setattr(struct vop_setattr_args *v)
int error;
- MPASS(VOP_ISLOCKED(vp, l));
+ MPASS(VOP_ISLOCKED(vp));
error = 0;
@@ -436,7 +436,7 @@ tmpfs_setattr(struct vop_setattr_args *v)
* from tmpfs_update. */
tmpfs_update(vp);
- MPASS(VOP_ISLOCKED(vp, l));
+ MPASS(VOP_ISLOCKED(vp));
return error;
}
@@ -752,7 +752,7 @@ tmpfs_fsync(struct vop_fsync_args *v)
{
struct vnode *vp = v->a_vp;
- MPASS(VOP_ISLOCKED(vp, v->a_td));
+ MPASS(VOP_ISLOCKED(vp));
tmpfs_update(vp);
@@ -773,8 +773,8 @@ tmpfs_remove(struct vop_remove_args *v)
struct tmpfs_node *dnode;
struct tmpfs_node *node;
- MPASS(VOP_ISLOCKED(dvp, v->a_cnp->cn_thread));
- MPASS(VOP_ISLOCKED(vp, v->a_cnp->cn_thread));
+ MPASS(VOP_ISLOCKED(dvp));
+ MPASS(VOP_ISLOCKED(vp));
if (vp->v_type == VDIR) {
error = EISDIR;
@@ -826,7 +826,7 @@ tmpfs_link(struct vop_link_args *v)
struct tmpfs_dirent *de;
struct tmpfs_node *node;
- MPASS(VOP_ISLOCKED(dvp, cnp->cn_thread));
+ MPASS(VOP_ISLOCKED(dvp));
MPASS(cnp->cn_flags & HASBUF);
MPASS(dvp != vp); /* XXX When can this be false? */
@@ -899,8 +899,8 @@ tmpfs_rename(struct vop_rename_args *v)
struct tmpfs_node *tnode;
struct tmpfs_node *tdnode;
- MPASS(VOP_ISLOCKED(tdvp, tcnp->cn_thread));
- MPASS(IMPLIES(tvp != NULL, VOP_ISLOCKED(tvp, tcnp->cn_thread)));
+ MPASS(VOP_ISLOCKED(tdvp));
+ MPASS(IMPLIES(tvp != NULL, VOP_ISLOCKED(tvp)));
MPASS(fcnp->cn_flags & HASBUF);
MPASS(tcnp->cn_flags & HASBUF);
@@ -1105,8 +1105,8 @@ tmpfs_rmdir(struct vop_rmdir_args *v)
struct tmpfs_node *dnode;
struct tmpfs_node *node;
- MPASS(VOP_ISLOCKED(dvp, v->a_cnp->cn_thread));
- MPASS(VOP_ISLOCKED(vp, v->a_cnp->cn_thread));
+ MPASS(VOP_ISLOCKED(dvp));
+ MPASS(VOP_ISLOCKED(vp));
tmp = VFS_TO_TMPFS(dvp->v_mount);
dnode = VP_TO_TMPFS_DIR(dvp);
@@ -1314,7 +1314,7 @@ tmpfs_inactive(struct vop_inactive_args *v)
struct tmpfs_node *node;
- MPASS(VOP_ISLOCKED(vp, l));
+ MPASS(VOP_ISLOCKED(vp));
node = VP_TO_TMPFS_NODE(vp);