Subject: CVS commit: src/sys/fs/smbfs
To: None <source-changes@netbsd.org>
From: Jaromir Dolecek <jdolecek@netbsd.org>
List: source-changes
Date: 02/26/2003 22:21:41
Module Name:	src
Committed By:	jdolecek
Date:		Wed Feb 26 20:21:41 UTC 2003

Modified Files:
	src/sys/fs/smbfs: smbfs_vfsops.c

Log Message:
Don't try to reacquire root vnode if vflush() in smbfs_unmount() fails.
This is potentially fragile, since the vnode may have been reclaimed
in vflush(), and used by different filesystem. This wouldn't actually
happen due to n_parent link to parent directory, but better safe
than sorry.

Since sm_root is only and strictly cache to speed up VFS_ROOT(),
it can be acquired/dropped any time. Rearrange code to not
require sm_root set, and change smbfs_root() back to set
sm_root if it's not set yet. smbfs_unmount() now only vrele()s
the root vnode if sm_root is set, and doesn't try reacquire it
if vflush() fails.

problem with vref() after vflush() pointed out by Bill Studenmund


To generate a diff of this commit:
cvs rdiff -r1.21 -r1.22 src/sys/fs/smbfs/smbfs_vfsops.c

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