]> git.hungrycats.org Git - linux/commitdiff
JFS: initialize log->bp before calling lmNextPage
authorDave Kleikamp <shaggy@austin.ibm.com>
Wed, 31 Mar 2004 03:48:27 +0000 (21:48 -0600)
committerDave Kleikamp <shaggy@austin.ibm.com>
Wed, 31 Mar 2004 03:48:27 +0000 (21:48 -0600)
fs/jfs/jfs_logmgr.c

index d53fff5bbe37953cc1670d65a5986b5bdbd5714d..b72fb4a40adc1548ae95df41d47fdf6281619068 100644 (file)
@@ -1371,14 +1371,13 @@ int lmLogInit(struct jfs_log * log)
                         le32_to_cpu(logsuper->end), log->page, log->eor,
                         le16_to_cpu(lp->h.eor));
 
-               /* if current page is full, move on to next page */
-               if (log->eor >= LOGPSIZE - LOGPTLRSIZE)
-                       lmNextPage(log);
-
                log->bp = bp;
                bp->l_pn = log->page;
                bp->l_eor = log->eor;
 
+               /* if current page is full, move on to next page */
+               if (log->eor >= LOGPSIZE - LOGPTLRSIZE)
+                       lmNextPage(log);
 
                /*
                 * initialize log syncpoint