From owner-svn-src-stable@FreeBSD.ORG Thu Apr 19 22:42:28 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B74FC106567A; Thu, 19 Apr 2012 22:42:28 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0BA38FC18; Thu, 19 Apr 2012 22:42:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q3JMgS5e010679; Thu, 19 Apr 2012 22:42:28 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3JMgSpR010675; Thu, 19 Apr 2012 22:42:28 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201204192242.q3JMgSpR010675@svn.freebsd.org> From: Kirk McKusick Date: Thu, 19 Apr 2012 22:42:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r234473 - in stable/9/sys: i386/conf kern sys ufs/ffs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Apr 2012 22:42:29 -0000 Author: mckusick Date: Thu Apr 19 22:42:28 2012 New Revision: 234473 URL: http://svn.freebsd.org/changeset/base/234473 Log: MFC of 234158: 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 Modified: stable/9/sys/kern/vfs_subr.c stable/9/sys/sys/vnode.h stable/9/sys/ufs/ffs/ffs_snapshot.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) stable/9/sys/kern/subr_witness.c (props changed) Modified: stable/9/sys/kern/vfs_subr.c ============================================================================== --- stable/9/sys/kern/vfs_subr.c Thu Apr 19 22:37:24 2012 (r234472) +++ stable/9/sys/kern/vfs_subr.c Thu Apr 19 22:42:28 2012 (r234473) @@ -103,7 +103,6 @@ static int flushbuflist(struct bufv *buf 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) { Modified: stable/9/sys/sys/vnode.h ============================================================================== --- stable/9/sys/sys/vnode.h Thu Apr 19 22:37:24 2012 (r234472) +++ stable/9/sys/sys/vnode.h Thu Apr 19 22:42:28 2012 (r234473) @@ -635,6 +635,7 @@ int vget(struct vnode *vp, int lockflag, 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); Modified: stable/9/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- stable/9/sys/ufs/ffs/ffs_snapshot.c Thu Apr 19 22:37:24 2012 (r234472) +++ stable/9/sys/ufs/ffs/ffs_snapshot.c Thu Apr 19 22:42:28 2012 (r234473) @@ -2572,20 +2572,9 @@ process_deferred_inactive(struct mount * 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);