git: 14ef49bbadec - stable/13 - msdosfs_rename(): handle errors from msdosfs_lookup_ino()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 25 Jan 2024 04:32:09 UTC
The branch stable/13 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=14ef49bbadeccf6f765025af33a07886fe3dae6f
commit 14ef49bbadeccf6f765025af33a07886fe3dae6f
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-01-17 22:55:05 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-01-24 13:04:38 +0000
msdosfs_rename(): handle errors from msdosfs_lookup_ino()
PR: 276408
(cherry picked from commit be0df84849ff3e8fb5ec65176ffde88dbefdc434)
---
sys/fs/msdosfs/msdosfs_vnops.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c
index 3ab9e3b3665f..a2fc115e2ca5 100644
--- a/sys/fs/msdosfs/msdosfs_vnops.c
+++ b/sys/fs/msdosfs/msdosfs_vnops.c
@@ -1192,8 +1192,8 @@ relock:
memcpy(oldname, fip->de_Name, 11);
memcpy(fip->de_Name, toname, 11); /* update denode */
error = msdosfs_lookup_ino(tdvp, NULL, tcnp, &scn, &blkoff);
- MPASS(error == EJUSTRETURN);
- error = createde(fip, tdip, NULL, tcnp);
+ if (error == EJUSTRETURN)
+ error = createde(fip, tdip, NULL, tcnp);
if (error != 0) {
memcpy(fip->de_Name, oldname, 11);
goto unlock;