Export vinactive() from kern/vfs_subr.c (e.g., make it no longer

static and declare its prototype in sys/vnode.h) so that it can be
called from process_deferred_inactive() (in ufs/ffs/ffs_snapshot.c)
instead of the body of vinactive() being cut and pasted into
process_deferred_inactive().

Reviewed by: kib
MFC after:   2 weeks
This commit is contained in:
mckusick 2012-04-11 23:01:11 +00:00
parent 54bf4ddfa2
commit 7901256b30
3 changed files with 3 additions and 14 deletions

View File

@ -103,7 +103,6 @@ static int flushbuflist(struct bufv *bufv, int flags, struct bufobj *bo,
static void syncer_shutdown(void *arg, int howto);
static int vtryrecycle(struct vnode *vp);
static void vbusy(struct vnode *vp);
static void vinactive(struct vnode *, struct thread *);
static void v_incr_usecount(struct vnode *);
static void v_decr_usecount(struct vnode *);
static void v_decr_useonly(struct vnode *);
@ -2401,7 +2400,7 @@ vdropl(struct vnode *vp)
* OWEINACT tracks whether a vnode missed a call to inactive due to a
* failed lock upgrade.
*/
static void
void
vinactive(struct vnode *vp, struct thread *td)
{

View File

@ -632,6 +632,7 @@ int vget(struct vnode *vp, int lockflag, struct thread *td);
void vgone(struct vnode *vp);
void vhold(struct vnode *);
void vholdl(struct vnode *);
void vinactive(struct vnode *, struct thread *);
int vinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo);
int vtruncbuf(struct vnode *vp, struct ucred *cred, struct thread *td,
off_t length, int blksize);

View File

@ -2572,20 +2572,9 @@ process_deferred_inactive(struct mount *mp)
MNT_ILOCK(mp);
continue;
}
VNASSERT((vp->v_iflag & VI_DOINGINACT) == 0, vp,
("process_deferred_inactive: "
"recursed on VI_DOINGINACT"));
vp->v_iflag |= VI_DOINGINACT;
vp->v_iflag &= ~VI_OWEINACT;
VI_UNLOCK(vp);
(void) VOP_INACTIVE(vp, td);
VI_LOCK(vp);
VNASSERT(vp->v_iflag & VI_DOINGINACT, vp,
("process_deferred_inactive: lost VI_DOINGINACT"));
vinactive(vp, td);
VNASSERT((vp->v_iflag & VI_OWEINACT) == 0, vp,
("process_deferred_inactive: got VI_OWEINACT"));
vp->v_iflag &= ~VI_DOINGINACT;
VI_UNLOCK(vp);
VOP_UNLOCK(vp, 0);
vdrop(vp);