]> git.saurik.com Git - apple/libc.git/commitdiff
Libc-391.5.22.tar.gz mac-os-x-10410x86 mac-os-x-10411x86 v391.5.22
authorApple <opensource@apple.com>
Tue, 30 Oct 2007 17:22:28 +0000 (17:22 +0000)
committerApple <opensource@apple.com>
Tue, 30 Oct 2007 17:22:28 +0000 (17:22 +0000)
db/mpool/FreeBSD/mpool.c.patch [new file with mode: 0644]

diff --git a/db/mpool/FreeBSD/mpool.c.patch b/db/mpool/FreeBSD/mpool.c.patch
new file mode 100644 (file)
index 0000000..285ef07
--- /dev/null
@@ -0,0 +1,23 @@
+--- mpool.c.orig       2006-12-13 22:19:43.000000000 -0800
++++ mpool.c    2006-12-13 22:27:26.000000000 -0800
+@@ -294,10 +294,16 @@
+       BKT *bp;
+       /* Walk the lru chain, flushing any dirty pages to disk. */
+-      TAILQ_FOREACH(bp, &mp->lqh, q)
+-              if (bp->flags & MPOOL_DIRTY &&
+-                  mpool_write(mp, bp) == RET_ERROR)
+-                      return (RET_ERROR);
++      TAILQ_FOREACH(bp, &mp->lqh, q) {
++              if (bp->flags & MPOOL_DIRTY)
++                      if (mpool_write(mp, bp) == RET_ERROR) {
++                              return (RET_ERROR);
++                      } else {
++                              /* 5126974: Re-run through the user's pgin filter. */
++                              if (mp->pgin != NULL)
++                                      (mp->pgin)(mp->pgcookie, bp->pgno, bp->page);
++                      }
++      }
+       /* Sync the file descriptor. */
+       return (_fsync(mp->fd) ? RET_ERROR : RET_SUCCESS);