Reduce memory usage slightly.
This commit is contained in:
parent
afe2341535
commit
20f54b189f
|
@ -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
|
* Copyright (c) 1980, 1986, 1993
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)dir.c 8.8 (Berkeley) 4/28/95";
|
static char sccsid[] = "@(#)dir.c 8.8 (Berkeley) 4/28/95";
|
||||||
#else
|
#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
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ propagate(inumber)
|
||||||
else if (inp->i_sibling)
|
else if (inp->i_sibling)
|
||||||
inp = inp->i_sibling;
|
inp = inp->i_sibling;
|
||||||
else
|
else
|
||||||
inp = inp->i_parentp;
|
inp = getinoinfo(inp->i_parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
@ -111,7 +111,7 @@ propagate(inumber)
|
||||||
else if (inp->i_sibling)
|
else if (inp->i_sibling)
|
||||||
inp = inp->i_sibling;
|
inp = inp->i_sibling;
|
||||||
else
|
else
|
||||||
inp = inp->i_parentp;
|
inp = getinoinfo(inp->i_parent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +124,6 @@ reparent(inumber, parent)
|
||||||
inp = getinoinfo(inumber);
|
inp = getinoinfo(inumber);
|
||||||
inp->i_parent = inp->i_dotdot = parent;
|
inp->i_parent = inp->i_dotdot = parent;
|
||||||
pinp = getinoinfo(parent);
|
pinp = getinoinfo(parent);
|
||||||
inp->i_parentp = pinp;
|
|
||||||
inp->i_sibling = pinp->i_child;
|
inp->i_sibling = pinp->i_child;
|
||||||
pinp->i_child = inp;
|
pinp->i_child = inp;
|
||||||
propagate(inumber);
|
propagate(inumber);
|
||||||
|
|
|
@ -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
|
* Copyright (c) 1980, 1986, 1993
|
||||||
|
@ -220,7 +220,7 @@ struct zlncnt *zlnhead; /* head of zero link count list */
|
||||||
*/
|
*/
|
||||||
struct inoinfo {
|
struct inoinfo {
|
||||||
struct inoinfo *i_nexthash; /* next entry in hash chain */
|
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_number; /* inode number of this entry */
|
||||||
ino_t i_parent; /* inode number of parent */
|
ino_t i_parent; /* inode number of parent */
|
||||||
ino_t i_dotdot; /* inode number of `..' */
|
ino_t i_dotdot; /* inode number of `..' */
|
||||||
|
|
|
@ -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
|
* Copyright (c) 1980, 1986, 1993
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)inode.c 8.8 (Berkeley) 4/28/95";
|
static char sccsid[] = "@(#)inode.c 8.8 (Berkeley) 4/28/95";
|
||||||
#else
|
#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
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
|
@ -504,7 +504,7 @@ cacheino(dp, inumber)
|
||||||
inpp = &inphead[inumber % dirhash];
|
inpp = &inphead[inumber % dirhash];
|
||||||
inp->i_nexthash = *inpp;
|
inp->i_nexthash = *inpp;
|
||||||
*inpp = inp;
|
*inpp = inp;
|
||||||
inp->i_child = inp->i_sibling = inp->i_parentp = 0;
|
inp->i_child = inp->i_sibling = 0;
|
||||||
if (inumber == ROOTINO)
|
if (inumber == ROOTINO)
|
||||||
inp->i_parent = ROOTINO;
|
inp->i_parent = ROOTINO;
|
||||||
else
|
else
|
||||||
|
|
|
@ -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
|
* Copyright (c) 1980, 1986, 1993
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)pass2.c 8.9 (Berkeley) 4/28/95";
|
static char sccsid[] = "@(#)pass2.c 8.9 (Berkeley) 4/28/95";
|
||||||
#else
|
#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
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@ pass2()
|
||||||
for (inpp = inpsort; inpp < inpend; inpp++) {
|
for (inpp = inpsort; inpp < inpend; inpp++) {
|
||||||
inp = *inpp;
|
inp = *inpp;
|
||||||
info = inoinfo(inp->i_number);
|
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)
|
if (info->ino_state == DFOUND)
|
||||||
info->ino_state = DSTATE;
|
info->ino_state = DSTATE;
|
||||||
}
|
}
|
||||||
|
@ -294,7 +294,6 @@ pass2()
|
||||||
inp->i_number == ROOTINO)
|
inp->i_number == ROOTINO)
|
||||||
continue;
|
continue;
|
||||||
pinp = getinoinfo(inp->i_parent);
|
pinp = getinoinfo(inp->i_parent);
|
||||||
inp->i_parentp = pinp;
|
|
||||||
inp->i_sibling = pinp->i_child;
|
inp->i_sibling = pinp->i_child;
|
||||||
pinp->i_child = inp;
|
pinp->i_child = inp;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue