summaryrefslogtreecommitdiff
path: root/sys/fs/nfsclient/nfs_clnode.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2017-08-20 10:08:45 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2017-08-20 10:08:45 +0000
commite5cffdd34bb2734f642d4c51f65bc56616561df7 (patch)
treea0714fd4831283c40a2b0c7a4d30cce7aac869e0 /sys/fs/nfsclient/nfs_clnode.c
parentb59ea7302971e64e609846bec32f8f055897d9bc (diff)
Notes
Diffstat (limited to 'sys/fs/nfsclient/nfs_clnode.c')
-rw-r--r--sys/fs/nfsclient/nfs_clnode.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/fs/nfsclient/nfs_clnode.c b/sys/fs/nfsclient/nfs_clnode.c
index 76ff26b07886b..c6fd5736f7385 100644
--- a/sys/fs/nfsclient/nfs_clnode.c
+++ b/sys/fs/nfsclient/nfs_clnode.c
@@ -141,6 +141,9 @@ ncl_nget(struct mount *mntp, u_int8_t *fhp, int fhsize, struct nfsnode **npp,
* happened to return an error no special casing is needed).
*/
mtx_init(&np->n_mtx, "NEWNFSnode lock", NULL, MTX_DEF | MTX_DUPOK);
+ lockinit(&np->n_excl, PVFS, "nfsupg", VLKTIMEOUT, LK_NOSHARE |
+ LK_CANRECURSE);
+
/*
* NFS supports recursive and shared locking.
*/
@@ -167,6 +170,7 @@ ncl_nget(struct mount *mntp, u_int8_t *fhp, int fhsize, struct nfsnode **npp,
*npp = NULL;
FREE((caddr_t)np->n_fhp, M_NFSFH);
mtx_destroy(&np->n_mtx);
+ lockdestroy(&np->n_excl);
uma_zfree(newnfsnode_zone, np);
return (error);
}
@@ -332,6 +336,7 @@ ncl_reclaim(struct vop_reclaim_args *ap)
if (np->n_v4 != NULL)
FREE((caddr_t)np->n_v4, M_NFSV4NODE);
mtx_destroy(&np->n_mtx);
+ lockdestroy(&np->n_excl);
uma_zfree(newnfsnode_zone, vp->v_data);
vp->v_data = NULL;
return (0);