summaryrefslogtreecommitdiff
path: root/include/linux/bvec.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2025-07-09 11:51:34 +0200
committerThomas Gleixner <tglx@linutronix.de>2025-07-09 11:51:34 +0200
commit068f7b64bf2054e20bbbd0782aa11f6ff8d17105 (patch)
treef9f88dfe79f4be4789480dc22f74908b3484a8f8 /include/linux/bvec.h
parent8959338617a85e35820e3a7fa21801cf55b068bf (diff)
parente04c78d86a9699d136910cfc0bdcf01087e3267e (diff)
Merge v6.16-rc2 into timers/ptp
to pick up the __GENMASK() fix, otherwise the AUX clock VDSO patches fail to compile for compat. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/bvec.h')
-rw-r--r--include/linux/bvec.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/bvec.h b/include/linux/bvec.h
index 204b22a99c4b..0a80e1f9aa20 100644
--- a/include/linux/bvec.h
+++ b/include/linux/bvec.h
@@ -57,9 +57,12 @@ static inline void bvec_set_page(struct bio_vec *bv, struct page *page,
* @offset: offset into the folio
*/
static inline void bvec_set_folio(struct bio_vec *bv, struct folio *folio,
- unsigned int len, unsigned int offset)
+ size_t len, size_t offset)
{
- bvec_set_page(bv, &folio->page, len, offset);
+ unsigned long nr = offset / PAGE_SIZE;
+
+ WARN_ON_ONCE(len > UINT_MAX);
+ bvec_set_page(bv, folio_page(folio, nr), len, offset % PAGE_SIZE);
}
/**