Re: [PATCH] ntfs: Fix error handling in __ntfs_create()
From: Hyunchul Lee
Date: Mon Oct 26 2026 - 20:28:24 EST
On Mon, Oct 26, 2026 at 12:43:00PM -0700, Bart Van Assche 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>
Looks good to me.
Reviewed-by: Hyunchul Lee <hyc.lee@xxxxxxxxx>
--
Thanks,
Hyunchul