svn commit: r312068 - stable/10/sys/fs/tmpfs
Konstantin Belousov
kib at FreeBSD.org
Fri Jan 13 12:45:55 UTC 2017
Author: kib
Date: Fri Jan 13 12:45:54 2017
New Revision: 312068
URL: https://svnweb.freebsd.org/changeset/base/312068
Log:
MFC r311524:
Use vnode lock assertion expression, assert exclusive ownership.
Modified:
stable/10/sys/fs/tmpfs/tmpfs_subr.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c
==============================================================================
--- stable/10/sys/fs/tmpfs/tmpfs_subr.c Fri Jan 13 12:44:52 2017 (r312067)
+++ stable/10/sys/fs/tmpfs/tmpfs_subr.c Fri Jan 13 12:45:54 2017 (r312068)
@@ -1458,7 +1458,7 @@ tmpfs_chflags(struct vnode *vp, u_long f
int error;
struct tmpfs_node *node;
- MPASS(VOP_ISLOCKED(vp));
+ ASSERT_VOP_ELOCKED(vp, "chflags");
node = VP_TO_TMPFS_NODE(vp);
@@ -1498,9 +1498,9 @@ tmpfs_chflags(struct vnode *vp, u_long f
node->tn_flags = flags;
node->tn_status |= TMPFS_NODE_CHANGED;
- MPASS(VOP_ISLOCKED(vp));
+ ASSERT_VOP_ELOCKED(vp, "chflags2");
- return 0;
+ return (0);
}
/*
@@ -1514,7 +1514,7 @@ tmpfs_chmod(struct vnode *vp, mode_t mod
int error;
struct tmpfs_node *node;
- MPASS(VOP_ISLOCKED(vp));
+ ASSERT_VOP_ELOCKED(vp, "chmod");
node = VP_TO_TMPFS_NODE(vp);
@@ -1554,9 +1554,9 @@ tmpfs_chmod(struct vnode *vp, mode_t mod
node->tn_status |= TMPFS_NODE_CHANGED;
- MPASS(VOP_ISLOCKED(vp));
+ ASSERT_VOP_ELOCKED(vp, "chmod2");
- return 0;
+ return (0);
}
/*
@@ -1575,7 +1575,7 @@ tmpfs_chown(struct vnode *vp, uid_t uid,
uid_t ouid;
gid_t ogid;
- MPASS(VOP_ISLOCKED(vp));
+ ASSERT_VOP_ELOCKED(vp, "chown");
node = VP_TO_TMPFS_NODE(vp);
@@ -1625,9 +1625,9 @@ tmpfs_chown(struct vnode *vp, uid_t uid,
node->tn_mode &= ~(S_ISUID | S_ISGID);
}
- MPASS(VOP_ISLOCKED(vp));
+ ASSERT_VOP_ELOCKED(vp, "chown2");
- return 0;
+ return (0);
}
/*
@@ -1642,7 +1642,7 @@ tmpfs_chsize(struct vnode *vp, u_quad_t
int error;
struct tmpfs_node *node;
- MPASS(VOP_ISLOCKED(vp));
+ ASSERT_VOP_ELOCKED(vp, "chsize");
node = VP_TO_TMPFS_NODE(vp);
@@ -1680,9 +1680,9 @@ tmpfs_chsize(struct vnode *vp, u_quad_t
/* 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));
+ ASSERT_VOP_ELOCKED(vp, "chsize2");
- return error;
+ return (error);
}
/*
@@ -1697,7 +1697,7 @@ tmpfs_chtimes(struct vnode *vp, struct v
int error;
struct tmpfs_node *node;
- MPASS(VOP_ISLOCKED(vp));
+ ASSERT_VOP_ELOCKED(vp, "chtimes");
node = VP_TO_TMPFS_NODE(vp);
@@ -1728,9 +1728,9 @@ tmpfs_chtimes(struct vnode *vp, struct v
if (vap->va_birthtime.tv_nsec != VNOVAL &&
vap->va_birthtime.tv_nsec != VNOVAL)
node->tn_birthtime = vap->va_birthtime;
- MPASS(VOP_ISLOCKED(vp));
+ ASSERT_VOP_ELOCKED(vp, "chtimes2");
- return 0;
+ return (0);
}
/* Sync timestamps */
More information about the svn-src-stable
mailing list