Subject: CVS commit: src/sys/fs/tmpfs
To: None <source-changes@NetBSD.org>
From: Antti Kantee <pooka@netbsd.org>
List: source-changes
Date: 11/23/2007 17:16:22
Module Name:	src
Committed By:	pooka
Date:		Fri Nov 23 17:16:22 UTC 2007

Modified Files:
	src/sys/fs/tmpfs: tmpfs_vnops.c

Log Message:
Fix a race condition: in case two source paths hardlinked to the
same file were renamed simultaneously, there was a window where
directory entry cached in the vnode during lookup would be replaced
before calling rename.  This lead to one directory entry getting
renamed twice and the other one getting zero renames.  Do a relookup
in rename to make sure we have the correct directory entry.

Thanks go to Greg Oster for reporting the problem, helping with
debugging and thoroughly testing the patch.


To generate a diff of this commit:
cvs rdiff -r1.42 -r1.43 src/sys/fs/tmpfs/tmpfs_vnops.c

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