Unverified Commit 197a3de6 authored by David Howells's avatar David Howells Committed by Christian Brauner
Browse files

iov_iter: Provide copy_folio_from_iter()



Provide a copy_folio_from_iter() wrapper.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
cc: Alexander Viro <viro@zeniv.linux.org.uk>
cc: Christian Brauner <christian@brauner.io>
cc: Matthew Wilcox <willy@infradead.org>
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
Link: https://lore.kernel.org/r/20240814203850.2240469-14-dhowells@redhat.com/

 # v2
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent db0aa2e9
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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)
{