mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 14:26:03 -04:00
msdosfs_rename(): handle errors from msdosfs_lookup_ino()
Properly working storage and correct filesystem structure indeed only allow the EJUSTRETURN return code, but since the called function needs to read directory blocks and (re)parse the content, the assert is not neccessary hold. PR: 276408 Reported by: John F. Carr Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43482
This commit is contained in:
parent
9fac39c63c
commit
be0df84849
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue