mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
msdosfs: fix directory corruption after rename operation
(cherry picked from commit 8b67c670a49b4efe7e1557121b5bbae682ea3bc7)
This commit is contained in:
parent
db43cefe08
commit
5f41ed8d09
1 changed files with 3 additions and 1 deletions
|
|
@ -1180,8 +1180,10 @@ relock:
|
|||
memcpy(oldname, fip->de_Name, 11);
|
||||
memcpy(fip->de_Name, toname, 11); /* update denode */
|
||||
error = msdosfs_lookup_ino(tdvp, NULL, tcnp, &scn, &blkoff);
|
||||
if (error == EJUSTRETURN)
|
||||
if (error == EJUSTRETURN) {
|
||||
tdip->de_fndoffset = to_diroffset;
|
||||
error = createde(fip, tdip, NULL, tcnp);
|
||||
}
|
||||
if (error != 0) {
|
||||
memcpy(fip->de_Name, oldname, 11);
|
||||
goto unlock;
|
||||
|
|
|
|||
Loading…
Reference in a new issue