diff options
author | Attilio Rao <attilio@FreeBSD.org> | 2008-02-24 16:38:58 +0000 |
---|---|---|
committer | Attilio Rao <attilio@FreeBSD.org> | 2008-02-24 16:38:58 +0000 |
commit | 628f51d2759f0b3f9cb107c3e5d55e8362c70c15 (patch) | |
tree | 997840c8acf28b15394b97f1d05d64f78bf81fd6 /sys/fs/nwfs | |
parent | 93b651d88cae17fdac73ea2ab71cc27b9f0e1f17 (diff) | |
download | src-628f51d2759f0b3f9cb107c3e5d55e8362c70c15.tar.gz src-628f51d2759f0b3f9cb107c3e5d55e8362c70c15.zip |
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.
Notes
Notes:
svn path=/head/; revision=176519
Diffstat (limited to 'sys/fs/nwfs')
-rw-r--r-- | sys/fs/nwfs/nwfs_node.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/nwfs/nwfs_node.c b/sys/fs/nwfs/nwfs_node.c index 7a4964197cb7..b36840ebced5 100644 --- a/sys/fs/nwfs/nwfs_node.c +++ b/sys/fs/nwfs/nwfs_node.c @@ -188,7 +188,7 @@ rescan: if (dvp) { np->n_parent = VTONW(dvp)->n_fid; } - vp->v_vnlock->lk_flags |= LK_CANRECURSE; + VN_LOCK_AREC(vp); lockmgr(&nwhashlock, LK_EXCLUSIVE, NULL); /* * Another process can create vnode while we blocked in malloc() or |