diff options
author | mohans <mohans@FreeBSD.org> | 2006-05-23 16:07:23 +0000 |
---|---|---|
committer | mohans <mohans@FreeBSD.org> | 2006-05-23 16:07:23 +0000 |
commit | f29eefcdec6824fa4600f52ec57bbfd075f0cc7a (patch) | |
tree | 019a59706e0795d3dba3058a2a72095962855238 | |
parent | a1e9e6f052227d59b1d157901395d3dac59bcb0e (diff) | |
download | FreeBSD-src-f29eefcdec6824fa4600f52ec57bbfd075f0cc7a.zip FreeBSD-src-f29eefcdec6824fa4600f52ec57bbfd075f0cc7a.tar.gz |
Vnode locks are recursive and the NFS client support shared vnode locks.
Found by: Kris Kennaway.
-rw-r--r-- | sys/nfsclient/nfs_node.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/nfsclient/nfs_node.c b/sys/nfsclient/nfs_node.c index b0a958a..7edf2dd 100644 --- a/sys/nfsclient/nfs_node.c +++ b/sys/nfsclient/nfs_node.c @@ -148,6 +148,11 @@ nfs_nget(struct mount *mntp, nfsfh_t *fhp, int fhsize, struct nfsnode **npp) vp->v_bufobj.bo_ops = &buf_ops_nfs; vp->v_data = np; np->n_vnode = vp; + /* + * NFS supports recursive and shared locking. + */ + vp->v_vnlock->lk_flags |= LK_CANRECURSE; + vp->v_vnlock->lk_flags &= ~LK_NOSHARE; error = vfs_hash_insert(vp, hash, LK_EXCLUSIVE, td, &nvp, nfs_vncmpf, &ncmp); if (error) |