Date: Sun, 29 Dec 2002 10:30:49 -0800 (PST) From: Ian Dowse <iedowse@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/sys vnode.h src/sys/kern vfs_subr.c Message-ID: <200212291830.gBTIUnfG083520@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
iedowse 2002/12/29 10:30:49 PST
Modified files:
sys/sys vnode.h
sys/kern vfs_subr.c
Log:
Add a new vnode flag VI_DOINGINACT to indicate that a VOP_INACTIVE
call is in progress on the vnode. When vput() or vrele() sees a
1->0 reference count transition, it now return without any further
action if this flag is set. This flag is necessary to avoid recursion
into VOP_INACTIVE if the filesystem inactive routine causes the
reference count to increase and then drop back to zero. It is also
used to guarantee that an unlocked vnode will not be recycled while
blocked in VOP_INACTIVE().
There are at least two cases where the recursion can occur: one is
that the softupdates code called by ufs_inactive() via ffs_truncate()
can call vput() on the vnode. This has been reported by many people
as "lockmgr: draining against myself" panics. The other case is
that nfs_inactive() can call vget() and then vrele() on the vnode
to clean up a sillyrename file.
Reviewed by: mckusick (an older version of the patch)
Revision Changes Path
1.426 +38 -15 src/sys/kern/vfs_subr.c
1.219 +3 -2 src/sys/sys/vnode.h
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212291830.gBTIUnfG083520>
