Re: [PATCH] exfat: write moved entry before removing source
Namjae Jeon <[email protected]> Tue, 28 Jul 2026 13:54:10 +0900
| Newsgroups | dev.linux.lists.exfat,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAKYAXd8QB0MPxKsSh4aE2GF-kzqNgi4mFJ0QX+pPEKqmsZF3Rg@mail.gmail.com> |
On Mon, Jul 27, 2026 at 6:12=E2=80=AFPM Yichong Chen <chenyichong@uniontech= .com> wrote: > > exfat_move_file() removes the old directory entry before the new entry > has been written. If writing the new entry fails, rename returns an > error after the source entry has already been marked deleted. > > Write the new entry first, then remove the old entry and update the > cached inode location. This keeps the source entry intact if creating > the destination entry fails. > > Signed-off-by: Yichong Chen <[email protected]> Applied it to #dev. Thanks!