summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2016-01-06 16:02:22 +0000
committerkib <kib@FreeBSD.org>2016-01-06 16:02:22 +0000
commitdba6e993392f229164e1087ae2f096f89f3a4891 (patch)
treea55cd3194ba8199fbf7cfcb93c10cd22b34081f4 /sys/fs
parentc8d8dd1a4db073793cb96e0bf4c9ea87157b0e88 (diff)
downloadFreeBSD-src-dba6e993392f229164e1087ae2f096f89f3a4891.zip
FreeBSD-src-dba6e993392f229164e1087ae2f096f89f3a4891.tar.gz
MFC r292961:
Force nullfs vnode reclaim after unlinking, to potentially unlink lower vnode.
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nullfs/null_vnops.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c
index 4762a3c..72b884f 100644
--- a/sys/fs/nullfs/null_vnops.c
+++ b/sys/fs/nullfs/null_vnops.c
@@ -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);
OpenPOWER on IntegriCloud