]> git.saurik.com Git - apple/libc.git/blobdiff - db/mpool/FreeBSD/mpool.c
Libc-997.1.1.tar.gz
[apple/libc.git] / db / mpool / FreeBSD / mpool.c
index 36fb30bb56bda9c3f165f327677faf82691b787a..56e6a308f7276181a1bf62e51462712737518e36 100644 (file)
@@ -281,7 +281,7 @@ mpool_sync(MPOOL *mp)
 
        /* Walk the lru chain, flushing any dirty pages to disk. */
        TAILQ_FOREACH(bp, &mp->lqh, q) {
-               if (bp->flags & MPOOL_DIRTY)
+               if (bp->flags & MPOOL_DIRTY) {
                        if (mpool_write(mp, bp) == RET_ERROR) {
                                return (RET_ERROR);
                        } else {
@@ -289,6 +289,7 @@ mpool_sync(MPOOL *mp)
                                if (mp->pgin != NULL)
                                        (mp->pgin)(mp->pgcookie, bp->pgno, bp->page);
                        }
+               }
        }
 
        /* Sync the file descriptor. */