diff options
author | roberto <roberto@FreeBSD.org> | 1997-10-21 21:01:34 +0000 |
---|---|---|
committer | roberto <roberto@FreeBSD.org> | 1997-10-21 21:01:34 +0000 |
commit | 83a98c9cc8a4d8a19688ac5d8f73bb08e6cc0a9b (patch) | |
tree | 3a800ae188040ff73fe8ad6c514ec461e10710f2 /sys/miscfs/nullfs | |
parent | 818a7b82e27297ff7f36230fb1efcf2965ec71e0 (diff) | |
download | FreeBSD-src-83a98c9cc8a4d8a19688ac5d8f73bb08e6cc0a9b.zip FreeBSD-src-83a98c9cc8a4d8a19688ac5d8f73bb08e6cc0a9b.tar.gz |
Fix the file leak bug. The lower layer wasn't informed the vnode was inactive
and kept a reference, preventing the blocks to be reclaimed.
Changed the comment in null_inactive to reflect the current situation.
Reviewed by: phk
Diffstat (limited to 'sys/miscfs/nullfs')
-rw-r--r-- | sys/miscfs/nullfs/null_vnops.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/miscfs/nullfs/null_vnops.c b/sys/miscfs/nullfs/null_vnops.c index 62f73af..e254787 100644 --- a/sys/miscfs/nullfs/null_vnops.c +++ b/sys/miscfs/nullfs/null_vnops.c @@ -37,11 +37,11 @@ * * Ancestors: * @(#)lofs_vnops.c 1.2 (Berkeley) 6/18/92 - * $Id: null_vnops.c,v 1.23 1997/10/15 09:21:07 phk Exp $ + * $Id: null_vnops.c,v 1.24 1997/10/15 10:04:31 phk Exp $ * ...and... * @(#)null_vnodeops.c 1.20 92/07/07 UCLA Ficus project * - * $Id: null_vnops.c,v 1.23 1997/10/15 09:21:07 phk Exp $ + * $Id: null_vnops.c,v 1.24 1997/10/15 10:04:31 phk Exp $ */ /* @@ -533,11 +533,16 @@ null_inactive(ap) struct proc *a_p; } */ *ap; { + struct vnode *vp = ap->a_vp; + struct null_node *xp = VTONULL(vp); + struct vnode *lowervp = xp->null_lowervp; /* * Do nothing (and _don't_ bypass). * Wait to vrele lowervp until reclaim, * so that until then our null_node is in the * cache and reusable. + * We still have to tell the lower layer the vnode + * is now inactive though. * * NEEDSWORK: Someday, consider inactive'ing * the lowervp and then trying to reactivate it @@ -545,6 +550,7 @@ null_inactive(ap) * like they do in the name lookup cache code. * That's too much work for now. */ + VOP_INACTIVE(lowervp, ap->a_p); VOP_UNLOCK(ap->a_vp, 0, ap->a_p); return (0); } |