From ee57d3458311f50b5cc423531d885a9735dee62d Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Wed, 15 Oct 1997 07:32:45 +0000 Subject: [PATCH] IN_HASHED goes in the in-core flags ip->i_flag, not in the on-disk flags ip->i_flags. Rev.1.18 completely broke ufs. My root directory went away about 10 seconds after booting. I think file system damage was null, since IN_HASHED = 0x80 is not used in the disk flags (it would probably be UF_SOMETHING if it were used). --- sys/gnu/ext2fs/ext2_ihash.c | 8 ++++---- sys/ufs/ufs/ufs_ihash.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/gnu/ext2fs/ext2_ihash.c b/sys/gnu/ext2fs/ext2_ihash.c index 8d41313ef571..a34e8c8a360c 100644 --- a/sys/gnu/ext2fs/ext2_ihash.c +++ b/sys/gnu/ext2fs/ext2_ihash.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ufs_ihash.c 8.7 (Berkeley) 5/17/95 - * $Id: ufs_ihash.c,v 1.10 1997/10/14 18:46:47 phk Exp $ + * $Id: ufs_ihash.c,v 1.11 1997/10/14 18:51:07 phk Exp $ */ #include @@ -131,7 +131,7 @@ ufs_ihashins(ip) simple_lock(&ufs_ihash_slock); ipp = INOHASH(ip->i_dev, ip->i_number); LIST_INSERT_HEAD(ipp, ip, i_hash); - ip->i_flags |= IN_HASHED; + ip->i_flag |= IN_HASHED; simple_unlock(&ufs_ihash_slock); } @@ -143,8 +143,8 @@ ufs_ihashrem(ip) struct inode *ip; { simple_lock(&ufs_ihash_slock); - if (ip->i_flags & IN_HASHED) { - ip->i_flags &= ~IN_HASHED; + if (ip->i_flag & IN_HASHED) { + ip->i_flag &= ~IN_HASHED; LIST_REMOVE(ip, i_hash); #ifdef DIAGNOSTIC ip->i_hash.le_next = NULL; diff --git a/sys/ufs/ufs/ufs_ihash.c b/sys/ufs/ufs/ufs_ihash.c index 8d41313ef571..a34e8c8a360c 100644 --- a/sys/ufs/ufs/ufs_ihash.c +++ b/sys/ufs/ufs/ufs_ihash.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ufs_ihash.c 8.7 (Berkeley) 5/17/95 - * $Id: ufs_ihash.c,v 1.10 1997/10/14 18:46:47 phk Exp $ + * $Id: ufs_ihash.c,v 1.11 1997/10/14 18:51:07 phk Exp $ */ #include @@ -131,7 +131,7 @@ ufs_ihashins(ip) simple_lock(&ufs_ihash_slock); ipp = INOHASH(ip->i_dev, ip->i_number); LIST_INSERT_HEAD(ipp, ip, i_hash); - ip->i_flags |= IN_HASHED; + ip->i_flag |= IN_HASHED; simple_unlock(&ufs_ihash_slock); } @@ -143,8 +143,8 @@ ufs_ihashrem(ip) struct inode *ip; { simple_lock(&ufs_ihash_slock); - if (ip->i_flags & IN_HASHED) { - ip->i_flags &= ~IN_HASHED; + if (ip->i_flag & IN_HASHED) { + ip->i_flag &= ~IN_HASHED; LIST_REMOVE(ip, i_hash); #ifdef DIAGNOSTIC ip->i_hash.le_next = NULL;