svn commit: r288280 - head/sys/kern
Mark Johnston
markj at FreeBSD.org
Sat Sep 26 22:41:25 UTC 2015
On Sat, Sep 26, 2015 at 03:28:34PM -0700, NGie Cooper wrote:
>
> > On Sep 26, 2015, at 15:26, Mark Johnston <markj at FreeBSD.org> wrote:
> >
> > Author: markj
> > Date: Sat Sep 26 22:26:55 2015
> > New Revision: 288280
> > URL: https://svnweb.freebsd.org/changeset/base/288280
> >
> > Log:
> > Remove a check for a condition that is always false by a preceding KASSERT
> > that was added in r144704.
> >
> > Modified:
> > head/sys/kern/vfs_subr.c
> >
> > Modified: head/sys/kern/vfs_subr.c
> > ==============================================================================
> > --- head/sys/kern/vfs_subr.c Sat Sep 26 22:20:30 2015 (r288279)
> > +++ head/sys/kern/vfs_subr.c Sat Sep 26 22:26:55 2015 (r288280)
> > @@ -1429,11 +1429,6 @@ flushbuflist(struct bufv *bufv, int flag
> > KASSERT(bp->b_bufobj == bo,
> > ("bp %p wrong b_bufobj %p should be %p",
> > bp, bp->b_bufobj, bo));
> > - if (bp->b_bufobj != bo) { /* XXX: necessary ? */
> > - BUF_UNLOCK(bp);
> > - BO_LOCK(bo);
> > - return (EAGAIN);
> > - }
> > /*
> > * XXX Since there are no node locks for NFS, I
> > * believe there is a slight chance that a delayed
> >
>
> Except the KASSERT gets optimized out with !INVARIANTS. Is this if-statement protecting against bad behavior?
Technically it was, but it's behaviour that could only occur as a result
of a bug elsewhere. The latest reports of this assertion failure that I
can find are all from 2005, when some buf-handling bugs were being
shaken out (see r147772 and r147387, for example). Given that this
invariant is pretty important and that it's been a decade since these
bugs were fixed, I believe it's safe to remove the extra handling.
More information about the svn-src-all
mailing list