summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2023-07-09 18:17:33 -0400
committerMatthew Wilcox (Oracle) <willy@infradead.org>2023-07-24 18:03:58 -0400
commit1b0306981e0f1e5a9ad3d08b9c88bfe21b68e3b9 (patch)
treee16b67d21299213742c04a9c3fb2fdaf860db473 /include
parent908a1ad89466c1febf20bfe0037b84fc66f8a3f8 (diff)
downloadlinux-stable-1b0306981e0f1e5a9ad3d08b9c88bfe21b68e3b9.tar.gz
linux-stable-1b0306981e0f1e5a9ad3d08b9c88bfe21b68e3b9.tar.bz2
linux-stable-1b0306981e0f1e5a9ad3d08b9c88bfe21b68e3b9.zip
iov_iter: Add copy_folio_from_iter_atomic()
Add a folio wrapper around copy_page_from_iter_atomic(). Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/uio.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/uio.h b/include/linux/uio.h
index ff81e5ccaef2..42bce38a8e87 100644
--- a/include/linux/uio.h
+++ b/include/linux/uio.h
@@ -163,7 +163,7 @@ static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs)
return ret;
}
-size_t copy_page_from_iter_atomic(struct page *page, unsigned offset,
+size_t copy_page_from_iter_atomic(struct page *page, size_t offset,
size_t bytes, struct iov_iter *i);
void iov_iter_advance(struct iov_iter *i, size_t bytes);
void iov_iter_revert(struct iov_iter *i, size_t bytes);
@@ -184,6 +184,13 @@ 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_atomic(struct folio *folio,
+ size_t offset, size_t bytes, struct iov_iter *i)
+{
+ return copy_page_from_iter_atomic(&folio->page, offset, bytes, i);
+}
+
size_t copy_page_to_iter_nofault(struct page *page, unsigned offset,
size_t bytes, struct iov_iter *i);