Re: [RFC PATCH v2 5/8] fat: drop ->write_begin() and ->write_end() usage from fat_cont_expand()
From: Christoph Hellwig
Date: Fri Nov 20 2026 - 13:31:56 EST
On Tue, Nov 17, 2026 at 11:01:45PM -0300, Matheus Alves de Almeida wrote:
> + while (pos < new_size) {
> + index = pos >> PAGE_SHIFT;
> +
> + folio = __filemap_get_folio(mapping, index, FGP_LOCK | FGP_CREAT,
> + mapping_gfp_mask(mapping));
This code would benefit a lot from moving the per-folio logic into
a helper. And given that all of the code until marking the folio dirty
is entirely generic, can we have it in common code? Did this get copied
from somewhere else or are there other obvious users that can share the
code?