git: e465acd0f6b9 - stable/14 - msdosfs_rename(): handle errors from msdosfs_lookup_ino()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 25 Jan 2024 03:45:35 UTC
The branch stable/14 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=e465acd0f6b9bfdedd0f3dc21cde81ccade3249c
commit e465acd0f6b9bfdedd0f3dc21cde81ccade3249c
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-01-17 22:55:05 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-01-25 03:44:55 +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 c17d9f785dc2..726b1d8e5cb7 100644
--- a/sys/fs/msdosfs/msdosfs_vnops.c
+++ b/sys/fs/msdosfs/msdosfs_vnops.c
@@ -1180,8 +1180,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;