diff options
| author | Kirk McKusick <mckusick@FreeBSD.org> | 2022-09-06 23:22:03 +0000 |
|---|---|---|
| committer | Kirk McKusick <mckusick@FreeBSD.org> | 2022-09-06 23:22:03 +0000 |
| commit | 2567b60f62534bf5b243972f85b4921bba837439 (patch) | |
| tree | bcaec7bb2ee628569614e9dc5688819225427af7 /sbin | |
| parent | 2ddf8cdbe085fb72ba68643709bf01d6fcc079dc (diff) | |
Diffstat (limited to 'sbin')
| -rw-r--r-- | sbin/fsck_ffs/dir.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/fsck_ffs/dir.c b/sbin/fsck_ffs/dir.c index 87e3e34cc1ad..ba286a965513 100644 --- a/sbin/fsck_ffs/dir.c +++ b/sbin/fsck_ffs/dir.c @@ -583,7 +583,8 @@ linkup(ino_t orphan, ino_t parentdir, char *name) inoinfo(lfdir)->ino_linkcnt++; pwarn("DIR I=%lu CONNECTED. ", (u_long)orphan); inp = getinoinfo(parentdir); - if (parentdir != (ino_t)-1 && (inp->i_flags & INFO_NEW) == 0) { + if (parentdir != (ino_t)-1 && inp != NULL && + (inp->i_flags & INFO_NEW) == 0) { printf("PARENT WAS I=%lu\n", (u_long)parentdir); /* * If the parent directory did not have to @@ -840,8 +841,7 @@ allocdir(ino_t parent, ino_t request, int mode) irelse(&ip); return (0); } - if ((inp = getinoinfo(ino)) == NULL) - inp = cacheino(dp, ino); + inp = cacheino(dp, ino); inp->i_parent = parent; inp->i_dotdot = parent; inoinfo(ino)->ino_state = inoinfo(parent)->ino_state; |
