git: f8073b224a14 - stable/14 - ufs: restore conditional
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 06 Aug 2025 00:28:30 UTC
The branch stable/14 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=f8073b224a14d1e2ae61408667818e401cced1b0
commit f8073b224a14d1e2ae61408667818e401cced1b0
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-07-29 12:45:25 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-08-06 00:26:32 +0000
ufs: restore conditional
(cherry picked from commit 98eb6f0eaa50d8bd9a6794f0a9da2eddeae5bcd8)
---
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 924e70a1a5f5..6940510e315e 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -1654,7 +1654,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) {