diff options
| author | Maarten Lankhorst <dev@lankhorst.se> | 2025-07-08 17:49:07 +0300 |
|---|---|---|
| committer | Maarten Lankhorst <dev@lankhorst.se> | 2025-07-08 17:49:07 +0300 |
| commit | e21354aea4b4420b53c44e36828607a7c94a994c (patch) | |
| tree | 003636d3a15eaebe9b948f9f8db6ad9e52a7e12c /include/linux/bvec.h | |
| parent | 482c7e296edc0f594e8869a789a40be53c49bd6a (diff) | |
| parent | 203dcde881561f1a4ee1084e2ee438fb4522c94a (diff) | |
| download | linux-e21354aea4b4420b53c44e36828607a7c94a994c.tar.xz | |
Merge remote-tracking branch 'drm/drm-next' into drm-misc-next
Pull in drm-intel-next for the updates to drm panic handling.
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
Diffstat (limited to 'include/linux/bvec.h')
| -rw-r--r-- | include/linux/bvec.h | 7 |
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); } /** |
