MFC r292961:

Force nullfs vnode reclaim after unlinking, to potentially unlink
lower vnode.
This commit is contained in:
kib 2016-01-06 16:02:22 +00:00
parent c8d8dd1a4d
commit dba6e99339

View File

@ -568,14 +568,16 @@ static int
null_remove(struct vop_remove_args *ap)
{
int retval, vreleit;
struct vnode *lvp;
struct vnode *lvp, *vp;
if (vrefcnt(ap->a_vp) > 1) {
lvp = NULLVPTOLOWERVP(ap->a_vp);
vp = ap->a_vp;
if (vrefcnt(vp) > 1) {
lvp = NULLVPTOLOWERVP(vp);
VREF(lvp);
vreleit = 1;
} else
vreleit = 0;
VTONULL(vp)->null_flags |= NULLV_DROP;
retval = null_bypass(&ap->a_gen);
if (vreleit != 0)
vrele(lvp);