Reduce memory usage slightly.

This commit is contained in:
mycroft 2004-07-20 15:05:32 +00:00
parent afe2341535
commit 20f54b189f
4 changed files with 12 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: dir.c,v 1.39 2004/01/10 14:28:37 mrg Exp $ */
/* $NetBSD: dir.c,v 1.40 2004/07/20 15:05:32 mycroft Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)dir.c 8.8 (Berkeley) 4/28/95";
#else
__RCSID("$NetBSD: dir.c,v 1.39 2004/01/10 14:28:37 mrg Exp $");
__RCSID("$NetBSD: dir.c,v 1.40 2004/07/20 15:05:32 mycroft Exp $");
#endif
#endif /* not lint */
@ -98,7 +98,7 @@ propagate(inumber)
else if (inp->i_sibling)
inp = inp->i_sibling;
else
inp = inp->i_parentp;
inp = getinoinfo(inp->i_parent);
}
for (;;) {
@ -111,7 +111,7 @@ propagate(inumber)
else if (inp->i_sibling)
inp = inp->i_sibling;
else
inp = inp->i_parentp;
inp = getinoinfo(inp->i_parent);
}
}
@ -124,7 +124,6 @@ reparent(inumber, parent)
inp = getinoinfo(inumber);
inp->i_parent = inp->i_dotdot = parent;
pinp = getinoinfo(parent);
inp->i_parentp = pinp;
inp->i_sibling = pinp->i_child;
pinp->i_child = inp;
propagate(inumber);

View File

@ -1,4 +1,4 @@
/* $NetBSD: fsck.h,v 1.38 2004/05/25 14:54:56 hannken Exp $ */
/* $NetBSD: fsck.h,v 1.39 2004/07/20 15:05:33 mycroft Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@ -220,7 +220,7 @@ struct zlncnt *zlnhead; /* head of zero link count list */
*/
struct inoinfo {
struct inoinfo *i_nexthash; /* next entry in hash chain */
struct inoinfo *i_child, *i_sibling, *i_parentp;
struct inoinfo *i_child, *i_sibling;
ino_t i_number; /* inode number of this entry */
ino_t i_parent; /* inode number of parent */
ino_t i_dotdot; /* inode number of `..' */

View File

@ -1,4 +1,4 @@
/* $NetBSD: inode.c,v 1.47 2004/05/25 14:54:56 hannken Exp $ */
/* $NetBSD: inode.c,v 1.48 2004/07/20 15:05:33 mycroft Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)inode.c 8.8 (Berkeley) 4/28/95";
#else
__RCSID("$NetBSD: inode.c,v 1.47 2004/05/25 14:54:56 hannken Exp $");
__RCSID("$NetBSD: inode.c,v 1.48 2004/07/20 15:05:33 mycroft Exp $");
#endif
#endif /* not lint */
@ -504,7 +504,7 @@ cacheino(dp, inumber)
inpp = &inphead[inumber % dirhash];
inp->i_nexthash = *inpp;
*inpp = inp;
inp->i_child = inp->i_sibling = inp->i_parentp = 0;
inp->i_child = inp->i_sibling = 0;
if (inumber == ROOTINO)
inp->i_parent = ROOTINO;
else

View File

@ -1,4 +1,4 @@
/* $NetBSD: pass2.c,v 1.36 2003/08/07 10:04:21 agc Exp $ */
/* $NetBSD: pass2.c,v 1.37 2004/07/20 15:05:33 mycroft Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)pass2.c 8.9 (Berkeley) 4/28/95";
#else
__RCSID("$NetBSD: pass2.c,v 1.36 2003/08/07 10:04:21 agc Exp $");
__RCSID("$NetBSD: pass2.c,v 1.37 2004/07/20 15:05:33 mycroft Exp $");
#endif
#endif /* not lint */
@ -284,7 +284,7 @@ pass2()
for (inpp = inpsort; inpp < inpend; inpp++) {
inp = *inpp;
info = inoinfo(inp->i_number);
inp->i_child = inp->i_sibling = inp->i_parentp = 0;
inp->i_child = inp->i_sibling = 0;
if (info->ino_state == DFOUND)
info->ino_state = DSTATE;
}
@ -294,7 +294,6 @@ pass2()
inp->i_number == ROOTINO)
continue;
pinp = getinoinfo(inp->i_parent);
inp->i_parentp = pinp;
inp->i_sibling = pinp->i_child;
pinp->i_child = inp;
}