[PATCH] initialize log->bp before calling lmNextPage (1 of 1)

[email protected] Thu, 1 Apr 2004 08:02:40 -0600
Newsgroups gmane.comp.file-systems.jfs.patches
Message-ID <[email protected]>
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/03/31 09:48:27-06:00 [email protected] 
#   JFS: initialize log->bp before calling lmNextPage
# 
diff -Nru a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c
--- a/fs/jfs/jfs_logmgr.c	Thu Apr  1 07:55:13 2004
+++ b/fs/jfs/jfs_logmgr.c	Thu Apr  1 07:55:13 2004
@@ -1371,14 +1371,13 @@
 			 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