Module Name:    src
Committed By:   snj
Date:           Mon Sep 13 19:52:49 UTC 2010

Modified Files:
        src/sys/kern [netbsd-5]: vfs_wapbl.c

Log Message:
Apply patch (requested by drochner in ticket #1454):
Fix inconsistencies in the wapbl replay process which can lead to a
premature abort of the fsck run and possibly leave a corrupted
filesystem.  Addresses PR bin/43336.


To generate a diff of this commit:
cvs rdiff -u -r1.3.8.1 -r1.3.8.2 src/sys/kern/vfs_wapbl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/vfs_wapbl.c
diff -u src/sys/kern/vfs_wapbl.c:1.3.8.1 src/sys/kern/vfs_wapbl.c:1.3.8.2
--- src/sys/kern/vfs_wapbl.c:1.3.8.1	Tue Feb 24 04:13:35 2009
+++ src/sys/kern/vfs_wapbl.c	Mon Sep 13 19:52:49 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_wapbl.c,v 1.3.8.1 2009/02/24 04:13:35 snj Exp $	*/
+/*	$NetBSD: vfs_wapbl.c,v 1.3.8.2 2010/09/13 19:52:49 snj Exp $	*/
 
 /*-
  * Copyright (c) 2003, 2008, 2009 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
  * This implements file system independent write ahead filesystem logging.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_wapbl.c,v 1.3.8.1 2009/02/24 04:13:35 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_wapbl.c,v 1.3.8.2 2010/09/13 19:52:49 snj Exp $");
 
 #include <sys/param.h>
 
@@ -2072,7 +2072,7 @@
 		for (hashsize = 1; hashsize < size; hashsize <<= 1)
 			continue;
 		wr->wr_blkhash = wapbl_malloc(hashsize * sizeof(*wr->wr_blkhash));
-		for (i = 0; i < wr->wr_blkhashmask; i++)
+		for (i = 0; i < hashsize; i++)
 			LIST_INIT(&wr->wr_blkhash[i]);
 		wr->wr_blkhashmask = hashsize - 1;
 	}

Reply via email to