On Thu, May 26, 2022 at 08:29:09PM +0100, Matthew Wilcox (Oracle) wrote: > + folio = __filemap_get_folio(mapping, index, > + FGP_CREAT|FGP_WRITE, GFP_KERNEL); missing spaces. > + folio_lock(folio); > + dst = kmap_local_folio(folio, offset_in_folio(folio, pos)); > + memcpy(dst, data, tocopy); mecpy_to_folio would be nice here. And gain the helper seems generic, but unlike the read side modern file system often want some kind of journaling. Not sure if it is worth sharing it just for ext2 and jfs.