Subject: Don't use ffs_vfsops.c rev. 1.27
To: None <current-users@NetBSD.ORG>
From: Frank van der Linden <frank@wins.uva.nl>
List: current-users
Date: 07/07/1997 14:28:10
If you picked up sys/ufs/ffs/ffs_vfsops.c version 1.27, don't use
it to compile a new kernel, it'll give you trouble (deadlocks). I made
an error in putting a lock around inode hashing.
Mean while, I backed out that change until I have time to fix it,
but should you have picked up 1.27 anyway, apply the following diff
and things should work for you.
I apologize for the inconvenience.
- Frank
Index: ffs_vfsops.c
===================================================================
RCS file: /a/cvsroot/src/sys/ufs/ffs/ffs_vfsops.c,v
retrieving revision 1.27
diff -c -r1.27 ffs_vfsops.c
*** ffs_vfsops.c 1997/07/06 12:43:43 1.27
--- ffs_vfsops.c 1997/07/07 11:40:47
***************
*** 784,794 ****
ump = VFSTOUFS(mp);
dev = ump->um_dev;
! lockmgr(&ufs_hashlock, LK_EXCLUSIVE, 0, curproc);
! if ((*vpp = ufs_ihashget(dev, ino)) != NULL) {
! lockmgr(&ufs_hashlock, LK_RELEASE, 0, curproc);
! return (0);
! }
/* Allocate a new vnode/inode. */
if ((error = getnewvnode(VT_UFS, mp, ffs_vnodeop_p, &vp)) != 0) {
--- 784,793 ----
ump = VFSTOUFS(mp);
dev = ump->um_dev;
! do {
! if ((*vpp = ufs_ihashget(dev, ino)) != NULL)
! return (0);
! } while (lockmgr(&ufs_hashlock, LK_EXCLUSIVE|LK_SLEEPFAIL, 0, curproc));
/* Allocate a new vnode/inode. */
if ((error = getnewvnode(VT_UFS, mp, ffs_vnodeop_p, &vp)) != 0) {