Skip to content

Commit

Permalink
Use vput() instead of vrele() in null_reclaim() since the lower vnode
Browse files Browse the repository at this point in the history
is locked.

MFC after:	3 days
  • Loading branch information
repppie committed Sep 2, 2005
1 parent 75d7ba9 commit cdeb720
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions sys/fs/nullfs/null_vnops.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,16 +634,17 @@ null_reclaim(struct vop_reclaim_args *ap)
VI_LOCK(vp);
vp->v_data = NULL;
VI_UNLOCK(vp);
if (lowervp) {
if (lowervp)
null_hashrem(xp);
vrele(lowervp);
}

vp->v_object = NULL;
vnlock = vp->v_vnlock;
vp->v_vnlock = &vp->v_lock;
lockmgr(vp->v_vnlock, LK_EXCLUSIVE, NULL, curthread);
lockmgr(vnlock, LK_RELEASE, NULL, curthread);
if (lowervp) {
vput(lowervp);
} else
lockmgr(vnlock, LK_RELEASE, NULL, curthread);
FREE(xp, M_NULLFSNODE);

return (0);
Expand Down

0 comments on commit cdeb720

Please sign in to comment.