[PATCH v4 4/5] mm/filemap: add write_begin_get_folio() helper function
Taotao Chen
chentao325 at qq.com
Tue Jul 8 02:40:52 UTC 2025
在 2025/7/7 22:54, Matthew Wilcox 写道:
> On Mon, Jul 07, 2025 at 07:00:33AM +0000, 陈涛涛 Taotao Chen wrote:
>> +++ b/mm/filemap.c
> I think this should be a static inline function. I don't think it's
> worth moving out of line. Of course if you have measurements that show
> differently, you can change my mind.
>
>> +/**
>> + * write_begin_get_folio - Get folio for write_begin with flags
>> + * @iocb: kiocb passed from write_begin (may be NULL)
>> + * @mapping: the address space to search in
>> + * @index: page cache index
>> + * @len: length of data being written
>> + *
>> + * This is a helper for filesystem write_begin() implementations.
>> + * It wraps __filemap_get_folio(), setting appropriate flags in
>> + * the write begin context.
>> + *
>> + * Returns a folio or an ERR_PTR.
> We prefer:
>
> * Return: A folio or an ERR_PTR
>
> as this gets its own section in the kernel-doc output.
Hi,
I’ll update both in the next version. Thanks for your review!
--Taotao
More information about the dri-devel
mailing list