summaryrefslogtreecommitdiffstats
path: root/sys/gnu
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2008-02-24 16:38:58 +0000
committerattilio <attilio@FreeBSD.org>2008-02-24 16:38:58 +0000
commit0d54671a48443b15ac601a80e192bc4c8faed7f9 (patch)
tree997840c8acf28b15394b97f1d05d64f78bf81fd6 /sys/gnu
parent1c8346475e6e9a892928e5197425bb703eba2930 (diff)
downloadFreeBSD-src-0d54671a48443b15ac601a80e192bc4c8faed7f9.zip
FreeBSD-src-0d54671a48443b15ac601a80e192bc4c8faed7f9.tar.gz
Introduce some functions in the vnode locks namespace and in the ffs
namespace in order to handle lockmgr fields in a controlled way instead than spreading all around bogus stubs: - VN_LOCK_AREC() allows lock recursion for a specified vnode - VN_LOCK_ASHARE() allows lock sharing for a specified vnode In FFS land: - BUF_AREC() allows lock recursion for a specified buffer lock - BUF_NOREC() disallows recursion for a specified buffer lock Side note: union_subr.c::unionfs_node_update() is the only other function directly handling lockmgr fields. As this is not simple to fix, it has been left behind as "sole" exception.
Diffstat (limited to 'sys/gnu')
-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 ff5b0c2..49cfb5d 100644
--- a/sys/gnu/fs/xfs/FreeBSD/xfs_freebsd_iget.c
+++ b/sys/gnu/fs/xfs/FreeBSD/xfs_freebsd_iget.c
@@ -389,7 +389,7 @@ xfs_vn_allocate(xfs_mount_t *mp, xfs_inode_t *ip, struct xfs_vnode **vpp)
return (error);
}
- vp->v_vnlock->lk_flags |= LK_CANRECURSE;
+ VN_LOCK_AREC(vp);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
error = insmntque(vp, XVFSTOMNT(XFS_MTOVFS(mp)));
if (error != 0) {
OpenPOWER on IntegriCloud