summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ffs/dir.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1998-12-03 02:41:11 +0000
committerjulian <julian@FreeBSD.org>1998-12-03 02:41:11 +0000
commitd77705b6d872e99ed9c1fe6ed1a27d8678cf7117 (patch)
tree18fe73766fe3f4bc6e842030267ad53b47f58fc5 /sbin/fsck_ffs/dir.c
parent64959e9518a11a823d591af2ed4f7c4c28ccb71a (diff)
downloadFreeBSD-src-d77705b6d872e99ed9c1fe6ed1a27d8678cf7117.zip
FreeBSD-src-d77705b6d872e99ed9c1fe6ed1a27d8678cf7117.tar.gz
Cosmetic and documentation changes brought from earlier FreeBSD versions.
(e.g. RCS Id:)
Diffstat (limited to 'sbin/fsck_ffs/dir.c')
-rw-r--r--sbin/fsck_ffs/dir.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sbin/fsck_ffs/dir.c b/sbin/fsck_ffs/dir.c
index ceb66e6..71e8a05b 100644
--- a/sbin/fsck_ffs/dir.c
+++ b/sbin/fsck_ffs/dir.c
@@ -32,7 +32,11 @@
*/
#ifndef lint
+#if 0
static const char sccsid[] = "@(#)dir.c 8.8 (Berkeley) 4/28/95";
+#endif
+static const char rcsid[] =
+ "$Id: dir.c,v 1.12 1998/09/23 05:37:35 nate Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -519,6 +523,13 @@ linkup(orphan, parentdir, name)
pwarn("DIR I=%lu CONNECTED. ", orphan);
if (parentdir != (ino_t)-1) {
printf("PARENT WAS I=%lu\n", (u_long)parentdir);
+ /*
+ * The parent directory, because of the ordering
+ * guarantees, has had the link count incremented
+ * for the child, but no entry was made. This
+ * fixes the parent link count so that fsck does
+ * not need to be rerun.
+ */
inoinfo(parentdir)->ino_linkcnt++;
}
if (preen == 0)
OpenPOWER on IntegriCloud