aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu/fs/xfs/FreeBSD
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2010-08-20 19:46:50 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2010-08-20 19:46:50 +0000
commit3634d5b2413604cb139184e0c60647b3d4490b33 (patch)
tree9899b196d40cbc0b664fe2238a340bf770b2bd81 /sys/gnu/fs/xfs/FreeBSD
parent365ccde0fb7f2b0809adf0c6be9ad511baf1dc90 (diff)
downloadsrc-3634d5b2413604cb139184e0c60647b3d4490b33.tar.gz
src-3634d5b2413604cb139184e0c60647b3d4490b33.zip
Add dedicated routines to toggle lockmgr flags such as LK_NOSHARE and
LK_CANRECURSE after a lock is created. Use them to implement macros that otherwise manipulated the flags directly. Assert that the associated lockmgr lock is exclusively locked by the current thread when manipulating these flags to ensure the flag updates are safe. This last change required some minor shuffling in a few filesystems to exclusively lock a brand new vnode slightly earlier. Reviewed by: kib MFC after: 3 days
Notes
Notes: svn path=/head/; revision=211531
Diffstat (limited to 'sys/gnu/fs/xfs/FreeBSD')
-rw-r--r--sys/gnu/fs/xfs/FreeBSD/xfs_freebsd_iget.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_freebsd_iget.c b/sys/gnu/fs/xfs/FreeBSD/xfs_freebsd_iget.c
index 49cfb5d51c1b..e4e1e8d57a3f 100644
--- a/sys/gnu/fs/xfs/FreeBSD/xfs_freebsd_iget.c
+++ b/sys/gnu/fs/xfs/FreeBSD/xfs_freebsd_iget.c
@@ -389,8 +389,8 @@ xfs_vn_allocate(xfs_mount_t *mp, xfs_inode_t *ip, struct xfs_vnode **vpp)
return (error);
}
- VN_LOCK_AREC(vp);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+ VN_LOCK_AREC(vp);
error = insmntque(vp, XVFSTOMNT(XFS_MTOVFS(mp)));
if (error != 0) {
kmem_free(vdata, sizeof(*vdata));