Re: [PATCH v6 09/37] ntfs: serialize export parent reconstruction

From: Namjae Jeon

Date: Sun Nov 22 2026 - 06:19:10 EST


On Wed, Nov 18, 2026 at 6:08 PM Xuewen Wang <wangxuewen_ky@xxxxxxx> wrote:
>
> From: Xuewen Wang <wangxuewen@xxxxxxxxxx>
>
> Exportfs calls ntfs_get_parent() without holding the child's inode lock.
> FILE_NAME lookup and parent loading can therefore race with rename or
> rmdir, despite the function's existing locking comment.
>
> Hold the child's mrec_lock across the lookup and parent load. Release it
> on every error path and before d_obtain_alias().
>
> Reviewed-by: Baolin Liu <liubaolin@xxxxxxxxxx>
> Signed-off-by: Xuewen Wang <wangxuewen@xxxxxxxxxx>
Applied it to #ntfs-next.
Thanks!