Re: [PATCH v6 11/16] ntfs: update runlist handling and cluster allocator
From: Christoph Hellwig
Date: Tue Feb 03 2026 - 01:40:02 EST
Suggested commit message:
Updates runlist handling and cluster allocation to support
contiguous allocations and filesystem trimming.
Improve the runlist API to handle allocation failures and introduces
discard support.
> + if (is_dealloc == true)
> + ntfs_release_dirty_clusters(vol, rl->length);
> up_write(&vol->lcnbmp_lock);
> + memalloc_nofs_restore(memalloc_flags);
> ntfs_debug("Done.");
> + return rl == NULL ? ERR_PTR(-EIO) : rl;
In general you want the memalloc_nofs_restore to be after goto
labels in a single place, as otherwise debugging is really hard.
In doubt a separate wrapper doing it my be even better.