svn commit: r292961 - head/sys/fs/nullfs
Konstantin Belousov
kib at FreeBSD.org
Wed Dec 30 19:49:24 UTC 2015
Author: kib
Date: Wed Dec 30 19:49:22 2015
New Revision: 292961
URL: https://svnweb.freebsd.org/changeset/base/292961
Log:
Force nullfs vnode reclaim after unlinking, to potentially unlink
lower vnode. Otherwise, reference to the lower vnode from the upper
one prevents final unlink.
PR: 178238
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Modified:
head/sys/fs/nullfs/null_vnops.c
Modified: head/sys/fs/nullfs/null_vnops.c
==============================================================================
--- head/sys/fs/nullfs/null_vnops.c Wed Dec 30 18:57:29 2015 (r292960)
+++ head/sys/fs/nullfs/null_vnops.c Wed Dec 30 19:49:22 2015 (r292961)
@@ -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);
More information about the svn-src-all
mailing list