kernel/vfs - Fix a refcount check in vclean_unlocked()
authorAntonio Huete Jimenez <tuxillo@quantumachine.net>
Tue, 4 Mar 2014 21:32:08 +0000 (22:32 +0100)
committerAntonio Huete Jimenez <tuxillo@quantumachine.net>
Tue, 4 Mar 2014 23:39:27 +0000 (00:39 +0100)
- vx_get() actually adds a ref so you actually need to count
  with that.

sys/kern/vfs_subr.c

index b2a1d60..32fb5f4 100644 (file)
@@ -1130,7 +1130,7 @@ void
 vclean_unlocked(struct vnode *vp)
 {
        vx_get(vp);
-       if (VREFCNT(vp) <= 0)
+       if (VREFCNT(vp) <= 1)
                vgone_vxlocked(vp);
        vx_put(vp);
 }