git: 49943856eb27 - main - Do not try to adjust a directory depth when its reconnection is declined.

From: Kirk McKusick <mckusick_at_FreeBSD.org>
Date: Sat, 27 May 2023 05:56:00 UTC
The branch main has been updated by mckusick:

URL: https://cgit.FreeBSD.org/src/commit/?id=49943856eb2710c6a6debdfa40d89d31d3fdb8ea

commit 49943856eb2710c6a6debdfa40d89d31d3fdb8ea
Author:     Kirk McKusick <mckusick@FreeBSD.org>
AuthorDate: 2023-05-27 05:55:11 +0000
Commit:     Kirk McKusick <mckusick@FreeBSD.org>
CommitDate: 2023-05-27 05:55:11 +0000

    Do not try to adjust a directory depth when its reconnection is declined.
    
    MFC after:    1 week
    Sponsored by: The FreeBSD Foundation
---
 sbin/fsck_ffs/pass3.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sbin/fsck_ffs/pass3.c b/sbin/fsck_ffs/pass3.c
index b9d24f18371b..49cb43620392 100644
--- a/sbin/fsck_ffs/pass3.c
+++ b/sbin/fsck_ffs/pass3.c
@@ -100,10 +100,10 @@ pass3(void)
 			if (linkup(orphan, inp->i_dotdot, NULL)) {
 				inp->i_parent = inp->i_dotdot = lfdir;
 				inoinfo(lfdir)->ino_linkcnt--;
+				inoinfo(orphan)->ino_state = DFOUND;
+				check_dirdepth(inp);
+				propagate();
 			}
-			inoinfo(orphan)->ino_state = DFOUND;
-			check_dirdepth(inp);
-			propagate();
 			continue;
 		}
 		pfatal("ORPHANED DIRECTORY LOOP DETECTED I=%lu",