Re: [PATCH] exfat: write moved entry before removing source
From: Namjae Jeon
Date: Tue Jul 28 2026 - 01:00:41 EST
On Mon, Jul 27, 2026 at 6:12 PM Yichong Chen <chenyichong@xxxxxxxxxxxxx> 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 <chenyichong@xxxxxxxxxxxxx>
Applied it to #dev.
Thanks!