Date: Sun, 25 Aug 2019 22:01:54 +0200 From: Oliver Pinter <oliver.pinter@hardenedbsd.org> To: Mateusz Guzik <mjg@freebsd.org> Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r351471 - in head/sys: kern sys Message-ID: <CAPQ4fftD57MXX8BpJB2RxNBdR2Ur144mSkB=nMiyFJU4KDs0=w@mail.gmail.com> In-Reply-To: <201908250511.x7P5BiPl016074@repo.freebsd.org> References: <201908250511.x7P5BiPl016074@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday, August 25, 2019, Mateusz Guzik <mjg@freebsd.org> wrote: > Author: mjg > Date: Sun Aug 25 05:11:43 2019 > New Revision: 351471 > URL: https://svnweb.freebsd.org/changeset/base/351471 > > Log: > vfs: add vholdnz (for already held vnodes) Why? (Yes, is can read the real reason in phabricator, but the phabricator didn't considered a persistent information in relation to commit message. Review helper tool just comes and goes as time goes forward, but commit messages survives the repo conversions to other VCS...) And once you have taken the time to write a correct description in phabricator, it would be really really nice and helpful if you would copy them into commit message. > > Reviewed by: kib (previous version) > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D21358 > > Modified: > head/sys/kern/vfs_subr.c > head/sys/sys/vnode.h > > Modified: head/sys/kern/vfs_subr.c > ============================================================ > ================== > --- head/sys/kern/vfs_subr.c Sun Aug 25 04:56:33 2019 (r351470) > +++ head/sys/kern/vfs_subr.c Sun Aug 25 05:11:43 2019 (r351471) > @@ -3018,6 +3018,19 @@ _vhold(struct vnode *vp, bool locked) > VI_UNLOCK(vp); > } > > +void > +vholdnz(struct vnode *vp) > +{ > + > + CTR2(KTR_VFS, "%s: vp %p", __func__, vp); > +#ifdef INVARIANTS > + int old = atomic_fetchadd_int(&vp->v_holdcnt, 1); > + VNASSERT(old > 0, vp, ("%s: wrong hold count", __func__)); > +#else > + atomic_add_int(&vp->v_holdcnt, 1); > +#endif > +} > + > /* > * Drop the hold count of the vnode. If this is the last reference to > * the vnode we place it on the free list unless it has been vgone'd > > Modified: head/sys/sys/vnode.h > ============================================================ > ================== > --- head/sys/sys/vnode.h Sun Aug 25 04:56:33 2019 (r351470) > +++ head/sys/sys/vnode.h Sun Aug 25 05:11:43 2019 (r351471) > @@ -657,6 +657,7 @@ void vgone(struct vnode *vp); > #define vhold(vp) _vhold((vp), 0) > #define vholdl(vp) _vhold((vp), 1) > void _vhold(struct vnode *, bool); > +void vholdnz(struct vnode *); > void vinactive(struct vnode *, struct thread *); > int vinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo); > int vtruncbuf(struct vnode *vp, off_t length, int blksize); > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPQ4fftD57MXX8BpJB2RxNBdR2Ur144mSkB=nMiyFJU4KDs0=w>