diff options
Diffstat (limited to 'usr/src/uts/common/fs/nfs/nfs4_rnode.c')
-rw-r--r-- | usr/src/uts/common/fs/nfs/nfs4_rnode.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/usr/src/uts/common/fs/nfs/nfs4_rnode.c b/usr/src/uts/common/fs/nfs/nfs4_rnode.c index 5d3254e478..14abf17329 100644 --- a/usr/src/uts/common/fs/nfs/nfs4_rnode.c +++ b/usr/src/uts/common/fs/nfs/nfs4_rnode.c @@ -30,6 +30,7 @@ /* * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2017 by Delphix. All rights reserved. */ #include <sys/param.h> @@ -603,7 +604,7 @@ start: rw_enter(&rp->r_hashq->r_lock, RW_WRITER); mutex_enter(&vp->v_lock); if (vp->v_count > 1) { - vp->v_count--; + VN_RELE_LOCKED(vp); mutex_exit(&vp->v_lock); rw_exit(&rp->r_hashq->r_lock); rw_enter(&rhtp->r_lock, RW_READER); @@ -618,7 +619,7 @@ start: mutex_enter(&vp->v_lock); if (vp->v_count > 1) { - vp->v_count--; + VN_RELE_LOCKED(vp); mutex_exit(&vp->v_lock); rw_enter(&rhtp->r_lock, RW_READER); goto start; @@ -785,7 +786,7 @@ rp4_addfree(rnode4_t *rp, cred_t *cr) rw_enter(&rp->r_hashq->r_lock, RW_WRITER); mutex_enter(&vp->v_lock); if (vp->v_count > 1) { - vp->v_count--; + VN_RELE_LOCKED(vp); mutex_exit(&vp->v_lock); rw_exit(&rp->r_hashq->r_lock); return; @@ -827,7 +828,7 @@ rp4_addfree(rnode4_t *rp, cred_t *cr) */ mutex_enter(&vp->v_lock); if (vp->v_count > 1) { - vp->v_count--; + VN_RELE_LOCKED(vp); mutex_exit(&vp->v_lock); return; } @@ -850,7 +851,7 @@ again: mutex_enter(&vp->v_lock); if (vp->v_count > 1) { - vp->v_count--; + VN_RELE_LOCKED(vp); mutex_exit(&vp->v_lock); rw_exit(&rp->r_hashq->r_lock); return; @@ -1552,7 +1553,7 @@ nfs4_rnode_reclaim(void) rw_enter(&rp->r_hashq->r_lock, RW_WRITER); mutex_enter(&vp->v_lock); if (vp->v_count > 1) { - vp->v_count--; + VN_RELE_LOCKED(vp); mutex_exit(&vp->v_lock); rw_exit(&rp->r_hashq->r_lock); mutex_enter(&rp4freelist_lock); |