svn commit: r325038 - stable/11/sys/kern
Mark Johnston
markj at FreeBSD.org
Fri Oct 27 14:24:36 UTC 2017
Author: markj
Date: Fri Oct 27 14:24:35 2017
New Revision: 325038
URL: https://svnweb.freebsd.org/changeset/base/325038
Log:
MFC r324804:
Avoid the nbp lookup in the final loop iteration in flushbuflist().
Modified:
stable/11/sys/kern/vfs_subr.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/kern/vfs_subr.c
==============================================================================
--- stable/11/sys/kern/vfs_subr.c Fri Oct 27 14:23:53 2017 (r325037)
+++ stable/11/sys/kern/vfs_subr.c Fri Oct 27 14:24:35 2017 (r325038)
@@ -1676,8 +1676,6 @@ flushbuflist(struct bufv *bufv, int flags, struct bufo
((flags & V_ALT) && (bp->b_xflags & BX_ALTDATA) == 0)) {
continue;
}
- lblkno = 0;
- xflags = 0;
if (nbp != NULL) {
lblkno = nbp->b_lblkno;
xflags = nbp->b_xflags & (BX_VNDIRTY | BX_VNCLEAN);
@@ -1712,6 +1710,8 @@ flushbuflist(struct bufv *bufv, int flags, struct bufo
bp->b_flags &= ~B_ASYNC;
brelse(bp);
BO_LOCK(bo);
+ if (nbp == NULL)
+ break;
nbp = gbincore(bo, lblkno);
if (nbp == NULL || (nbp->b_xflags & (BX_VNDIRTY | BX_VNCLEAN))
!= xflags)
More information about the svn-src-all
mailing list