svn commit: r245352 - stable/9/sys/fs/nullfs
Konstantin Belousov
kib at FreeBSD.org
Sun Jan 13 00:46:39 UTC 2013
Author: kib
Date: Sun Jan 13 00:46:39 2013
New Revision: 245352
URL: http://svnweb.freebsd.org/changeset/base/245352
Log:
MFC r245262:
When nullfs mount is forcibly unmounted and nullfs vnode is reclaimed,
get back the leased write reference from the lower vnode. There is no
other path which can correct v_writecount on the lowervp.
Modified:
stable/9/sys/fs/nullfs/null_vnops.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/fs/ (props changed)
Modified: stable/9/sys/fs/nullfs/null_vnops.c
==============================================================================
--- stable/9/sys/fs/nullfs/null_vnops.c Sun Jan 13 00:32:07 2013 (r245351)
+++ stable/9/sys/fs/nullfs/null_vnops.c Sun Jan 13 00:46:39 2013 (r245352)
@@ -725,6 +725,14 @@ null_reclaim(struct vop_reclaim_args *ap
vp->v_object = NULL;
vp->v_vnlock = &vp->v_lock;
VI_UNLOCK(vp);
+
+ /*
+ * If we were opened for write, we leased one write reference
+ * to the lower vnode. If this is a reclamation due to the
+ * forced unmount, undo the reference now.
+ */
+ if (vp->v_writecount > 0)
+ VOP_ADD_WRITECOUNT(lowervp, -1);
vput(lowervp);
free(xp, M_NULLFSNODE);
More information about the svn-src-stable-9
mailing list