Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jul 2025 12:47:43 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 98eb6f0eaa50 - main - ufs: restore conditional
Message-ID:  <202507291247.56TClhiR032682@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=98eb6f0eaa50d8bd9a6794f0a9da2eddeae5bcd8

commit 98eb6f0eaa50d8bd9a6794f0a9da2eddeae5bcd8
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-07-29 12:45:25 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-07-29 12:47:37 +0000

    ufs: restore conditional
    
    Fixes:  610319c766e941de96e52f2d28fea9f8cfc51aeb
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/ufs/ufs/ufs_vnops.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index 2757fb066981..050b21c2be0b 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -1642,7 +1642,8 @@ relock:
 				softdep_change_linkcnt(tip);
 		}
 		error = ufs_dirrewrite(tdp, tip, fip->i_number,
-		    IFTODT(fip->i_mode), doingdirectory);
+		    IFTODT(fip->i_mode), (doingdirectory && newparent != 0) ?
+		    newparent != 0: doingdirectory);
 		if (error) {
 			if (doingdirectory) {
 				if (newparent == 0) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202507291247.56TClhiR032682>