Date: Mon, 28 Jul 2014 01:06:37 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r269169 - stable/10/sys/fs/tmpfs Message-ID: <201407280106.s6S16b8e010402@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Mon Jul 28 01:06:36 2014 New Revision: 269169 URL: http://svnweb.freebsd.org/changeset/base/269169 Log: MFC r268610: Add convenience macro to assert tmpfs node lock. Modified: stable/10/sys/fs/tmpfs/tmpfs.h stable/10/sys/fs/tmpfs/tmpfs_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/tmpfs/tmpfs.h ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs.h Mon Jul 28 01:04:33 2014 (r269168) +++ stable/10/sys/fs/tmpfs/tmpfs.h Mon Jul 28 01:06:36 2014 (r269169) @@ -276,6 +276,8 @@ LIST_HEAD(tmpfs_node_list, tmpfs_node); #define TMPFS_NODE_LOCK(node) mtx_lock(&(node)->tn_interlock) #define TMPFS_NODE_UNLOCK(node) mtx_unlock(&(node)->tn_interlock) #define TMPFS_NODE_MTX(node) (&(node)->tn_interlock) +#define TMPFS_NODE_ASSERT_LOCKED(node) mtx_assert(TMPFS_NODE_MTX(node), \ + MA_OWNED) #ifdef INVARIANTS #define TMPFS_ASSERT_LOCKED(node) do { \ Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_subr.c Mon Jul 28 01:04:33 2014 (r269168) +++ stable/10/sys/fs/tmpfs/tmpfs_subr.c Mon Jul 28 01:06:36 2014 (r269169) @@ -633,7 +633,7 @@ tmpfs_free_vp(struct vnode *vp) node = VP_TO_TMPFS_NODE(vp); - mtx_assert(TMPFS_NODE_MTX(node), MA_OWNED); + TMPFS_NODE_ASSERT_LOCKED(node); node->tn_vnode = NULL; if ((node->tn_vpstate & TMPFS_VNODE_WRECLAIM) != 0) wakeup(&node->tn_vnode);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407280106.s6S16b8e010402>