Re: [PATCH 06/48] iov_iter: Add copy_folio_to_iter()

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

 



On Wed, Dec 22, 2021 at 10:55:20PM -0800, Christoph Hellwig wrote:
> On Wed, Dec 08, 2021 at 04:22:14AM +0000, Matthew Wilcox (Oracle) wrote:
> > +static inline size_t copy_folio_to_iter(struct folio *folio, size_t offset,
> > +		size_t bytes, struct iov_iter *i)
> > +{
> > +	return copy_page_to_iter((struct page *)folio, offset, bytes, i);
> > +}
> 
> I think we had this 2 or three series ago, but these open coded casts
> are a bad idea.  I think we need a proper and well documented helper for
> them.

I don't want to see casts between folio & page in most code, but I think
having it in this kind of helper is fine.  It literally exists in order
to document that the callee handles folios correctly.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux