Re: [PATCH v4 4/5] mm/filemap: add write_begin_get_folio() helper function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




在 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







[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux