have to make cache entries for new directory inodes
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Sat, 27 Jul 1991 07:30:00 +0000 (23:30 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Sat, 27 Jul 1991 07:30:00 +0000 (23:30 -0800)
SCCS-vsn: sbin/fsck/dir.c 5.19

usr/src/sbin/fsck/dir.c

index 7aa3b9e..6d7f1fd 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)dir.c      5.18 (Berkeley) %G%";
+static char sccsid[] = "@(#)dir.c      5.19 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -522,12 +522,14 @@ allocdir(parent, request, mode)
        inodirty();
        if (ino == ROOTINO) {
                lncntp[ino] = dp->di_nlink;
        inodirty();
        if (ino == ROOTINO) {
                lncntp[ino] = dp->di_nlink;
+               cacheino(dp, ino);
                return(ino);
        }
        if (statemap[parent] != DSTATE && statemap[parent] != DFOUND) {
                freeino(ino);
                return (0);
        }
                return(ino);
        }
        if (statemap[parent] != DSTATE && statemap[parent] != DFOUND) {
                freeino(ino);
                return (0);
        }
+       cacheino(dp, ino);
        statemap[ino] = statemap[parent];
        if (statemap[ino] == DSTATE) {
                lncntp[ino] = dp->di_nlink;
        statemap[ino] = statemap[parent];
        if (statemap[ino] == DSTATE) {
                lncntp[ino] = dp->di_nlink;