[PATCH v2 13/25] iov_iter: Provide copy_folio_from_iter()

David Howells dhowells at redhat.com
Thu Aug 15 06:38:33 AEST 2024


Provide a copy_folio_from_iter() wrapper.

Signed-off-by: David Howells <dhowells at redhat.com>
cc: Alexander Viro <viro at zeniv.linux.org.uk>
cc: Christian Brauner <christian at brauner.io>
cc: Matthew Wilcox <willy at infradead.org>
cc: netfs at lists.linux.dev
cc: linux-fsdevel at vger.kernel.org
cc: linux-mm at kvack.org
---
 include/linux/uio.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/uio.h b/include/linux/uio.h
index 845d110acadc..853f9de5aa05 100644
--- a/include/linux/uio.h
+++ b/include/linux/uio.h
@@ -189,6 +189,12 @@ static inline size_t copy_folio_to_iter(struct folio *folio, size_t offset,
 	return copy_page_to_iter(&folio->page, offset, bytes, i);
 }
 
+static inline size_t copy_folio_from_iter(struct folio *folio, size_t offset,
+					  size_t bytes, struct iov_iter *i)
+{
+	return copy_page_from_iter(&folio->page, offset, bytes, i);
+}
+
 static inline size_t copy_folio_from_iter_atomic(struct folio *folio,
 		size_t offset, size_t bytes, struct iov_iter *i)
 {



More information about the Linux-erofs mailing list