Subject: CVS commit: syssrc
To: None <source-changes@netbsd.org>
From: Frank van der Linden <fvdl@netbsd.org>
List: source-changes
Date: 02/26/2001 22:25:12
Module Name:	syssrc
Committed By:	fvdl
Date:		Mon Feb 26 20:25:12 UTC 2001

Modified Files:
	syssrc/sys/ufs/ufs: ufs_lookup.c

Log Message:
Some bugfixes from rev 1.33 and 1.34 of this file in FreeBSD (some
in effect cosmetic). Original FreeBSD commit messages:

==
date: 2000/03/15 07:18:15;  author: mckusick;  state: Exp;  lines: +4 -4
Bug fixes for currently harmless bugs that could rise to bite
the unwary if the code were called in slightly different ways.

[...]

2) In ufs_lookup() there is an off-by-one error in the test that checks
if dp->i_diroff is outside the range of the the current directory size.
This is completely harmless, since the following while-loop condition
'dp->i_offset < endsearch' is never met, so the code immediately
does a second pass starting at dp->i_offset = 0.

3) Again in ufs_lookup(), the condition in a sanity check is wrong
for directories that are longer than one block. This bug means that
the sanity check is only effective for small directories.

Submitted by:   Ian Dowse <iedowse@maths.tcd.ie>

==

date: 2000/03/09 18:54:59;  author: dillon;  state: Exp;  lines: +2 -2
branches:  1.33.2;
    In the 'found' case for ufs_lookup() the underlying bp's data was
    being accessed after the bp had been releaed.  A simple move of the
    brelse() solves the problem.

Approved by: jkh
Submitted by:  Ian Dowse <iedowse@maths.tcd.ie>

==


To generate a diff of this commit:
cvs rdiff -r1.32 -r1.33 syssrc/sys/ufs/ufs/ufs_lookup.c

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