From 9ae69e2f11c7ff12a8a14f24d49c12d0c6f7b4d5 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Fri, 12 Sep 2025 09:57:53 +1000 Subject: [PATCH] Linux 6.18: replace nth_page() Sponsored-by: https://despairlabs.com/sponsor/ Signed-off-by: Rob Norris --- module/os/linux/zfs/abd_os.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/module/os/linux/zfs/abd_os.c b/module/os/linux/zfs/abd_os.c index e1140b31a97aac515bbd9c9e33abca98c5abef80..1d3664ff36789bae5afc4062e7d060439d067d10 100644 --- a/module/os/linux/zfs/abd_os.c +++ b/module/os/linux/zfs/abd_os.c @@ -23,6 +23,7 @@ * Copyright (c) 2014 by Chunwei Chen. All rights reserved. * Copyright (c) 2019 by Delphix. All rights reserved. * Copyright (c) 2023, 2024, Klara Inc. + * Copyright (c) 2025, Rob Norris */ /* @@ -1113,6 +1114,14 @@ abd_return_buf_copy(abd_t *abd, void *buf, size_t n) #define ABD_ITER_PAGE_SIZE(page) (PAGESIZE) #endif +#ifndef nth_page +/* + * Since 6.18 nth_page() no longer exists, and is no longer required to iterate + * within a single SG entry, so we replace it with a simple addition. + */ +#define nth_page(p, n) ((p)+(n)) +#endif + void abd_iter_page(struct abd_iter *aiter) {