summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sbin/fsck/dir.c6
-rw-r--r--sbin/fsck_ffs/dir.c6
-rw-r--r--sbin/fsck_ifs/dir.c6
3 files changed, 15 insertions, 3 deletions
diff --git a/sbin/fsck/dir.c b/sbin/fsck/dir.c
index 5ce99f6..5def8b2 100644
--- a/sbin/fsck/dir.c
+++ b/sbin/fsck/dir.c
@@ -669,7 +669,8 @@ allocdir(parent, request, mode)
ino_t ino;
char *cp;
struct dinode *dp;
- register struct bufarea *bp;
+ struct bufarea *bp;
+ struct inoinfo *inp;
struct dirtemplate *dirp;
ino = allocino(request, IFDIR|mode);
@@ -704,6 +705,9 @@ allocdir(parent, request, mode)
return (0);
}
cacheino(dp, ino);
+ inp = getinoinfo(ino);
+ inp->i_parent = parent;
+ inp->i_dotdot = parent;
inoinfo(ino)->ino_state = inoinfo(parent)->ino_state;
if (inoinfo(ino)->ino_state == DSTATE) {
inoinfo(ino)->ino_linkcnt = dp->di_nlink;
diff --git a/sbin/fsck_ffs/dir.c b/sbin/fsck_ffs/dir.c
index 5ce99f6..5def8b2 100644
--- a/sbin/fsck_ffs/dir.c
+++ b/sbin/fsck_ffs/dir.c
@@ -669,7 +669,8 @@ allocdir(parent, request, mode)
ino_t ino;
char *cp;
struct dinode *dp;
- register struct bufarea *bp;
+ struct bufarea *bp;
+ struct inoinfo *inp;
struct dirtemplate *dirp;
ino = allocino(request, IFDIR|mode);
@@ -704,6 +705,9 @@ allocdir(parent, request, mode)
return (0);
}
cacheino(dp, ino);
+ inp = getinoinfo(ino);
+ inp->i_parent = parent;
+ inp->i_dotdot = parent;
inoinfo(ino)->ino_state = inoinfo(parent)->ino_state;
if (inoinfo(ino)->ino_state == DSTATE) {
inoinfo(ino)->ino_linkcnt = dp->di_nlink;
diff --git a/sbin/fsck_ifs/dir.c b/sbin/fsck_ifs/dir.c
index 5ce99f6..5def8b2 100644
--- a/sbin/fsck_ifs/dir.c
+++ b/sbin/fsck_ifs/dir.c
@@ -669,7 +669,8 @@ allocdir(parent, request, mode)
ino_t ino;
char *cp;
struct dinode *dp;
- register struct bufarea *bp;
+ struct bufarea *bp;
+ struct inoinfo *inp;
struct dirtemplate *dirp;
ino = allocino(request, IFDIR|mode);
@@ -704,6 +705,9 @@ allocdir(parent, request, mode)
return (0);
}
cacheino(dp, ino);
+ inp = getinoinfo(ino);
+ inp->i_parent = parent;
+ inp->i_dotdot = parent;
inoinfo(ino)->ino_state = inoinfo(parent)->ino_state;
if (inoinfo(ino)->ino_state == DSTATE) {
inoinfo(ino)->ino_linkcnt = dp->di_nlink;
OpenPOWER on IntegriCloud