scatterlist: add sg_set_folio()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 21 Jun 2023 16:45:47 +0000 (17:45 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 23 Jun 2023 23:59:28 +0000 (16:59 -0700)
commitbdadc6d83156016d2b5eed582c1458c881c53a1e
tree621d00a1f75e5423f071ee14ae0609cddafe9737
parent982a7194afc9a58ec55ed174c61869c2722bb918
scatterlist: add sg_set_folio()

This wrapper for sg_set_page() lets drivers add folios to a scatterlist
more easily.  We could, perhaps, do better by using a different page in
the folio if offset is larger than UINT_MAX, but let's hope we get a
better data structure than this before we need to care about such large
folios.

Link: https://lkml.kernel.org/r/20230621164557.3510324-4-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/scatterlist.h