Re: [PATCH] ntfs: Fix error handling in __ntfs_create()
From: Namjae Jeon
Date: Tue Oct 27 2026 - 05:26:54 EST
On Tue, Oct 27, 2026 at 4:43 AM Bart Van Assche <bvanassche@xxxxxxx> wrote:
>
> In __ntfs_create(), if ntfs_init_acl() fails before
> ntfs_mft_record_alloc() is called, jumping to err_out frees MFT record
> 0 ($MFT), unmaps an unmapped record and unlocks the unheld
> &dir_ni->mrec_lock and &ni->mrec_lock mutexes. Call iput(vi) and
> return ERR_PTR(err) directly instead, matching the
> ntfs_mft_record_alloc() failure path right below it.
>
> Fixes: af0db57d4293 ("ntfs: update inode operations")
> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
Applied it to #ntfs-next.
Thanks!