Subject: CVS commit: src/sys/ufs/lfs
To: None <>
From: Frank van der Linden <>
List: source-changes
Date: 03/29/2003 00:39:46
Module Name:	src
Committed By:	fvdl
Date:		Fri Mar 28 22:39:45 UTC 2003

Modified Files:
	src/sys/ufs/lfs: lfs_segment.c

Log Message:
The checkpoint loop always used (multiples of) lfs_sepb as the number
of segments to mark. However, this may be much more than lfs_nseg.

Originally this wasn't a big problem, since only the structures in the
diskblock were changed, but nowadays there's a mirror of the segflags
in the in-core superblock. This problem caused the code to walk
way past the end of that allocated area, causing memory corruption
in other kernel structures. So, use lfs_nseg as the maximum, as it should be.

While here, simplify the loop; it had become an obfuscated piece of
code overtime.

To generate a diff of this commit:
cvs rdiff -r1.116 -r1.117 src/sys/ufs/lfs/lfs_segment.c

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