mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
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).
This commit is contained in:
parent
e015c87712
commit
ee57d34583
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=30428
@ -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 <sys/param.h>
|
||||
@ -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;
|
||||
|
@ -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 <sys/param.h>
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user