From f8572e2a9733d071c0632316187e1de3c1f3fed5 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 9 Dec 2025 23:45:51 +0000 Subject: [PATCH] Fix a declaration position of the nth_page. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compilation time bug introduced by 87df5e4 commit. Fix for the compilation error(Linux kernel 6.18.0): "zfs/module/os/linux/zfs/abd_os.c:920:32: error: implicit declaration of function ‘nth_page’; did you mean ‘pte_page’? [-Werror=implicit-function-declaration]". Reviewed-by: Brian Behlendorf Reviewed-by: Rob Norris Signed-off-by: agiUnderground Closes #18034 --- module/os/linux/zfs/abd_os.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/module/os/linux/zfs/abd_os.c b/module/os/linux/zfs/abd_os.c index 37d9007a6..2fd3c3f69 100644 --- a/module/os/linux/zfs/abd_os.c +++ b/module/os/linux/zfs/abd_os.c @@ -888,6 +888,14 @@ abd_iter_advance(struct abd_iter *aiter, size_t amount) } } +#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 + /* * Map the current chunk into aiter. This can be safely called when the aiter * has already exhausted, in which case this does nothing. @@ -1123,14 +1131,6 @@ 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) {