Linux 6.18: replace nth_page()

Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
This commit is contained in:
Rob Norris 2025-09-12 09:57:53 +10:00 committed by Tony Hutter
parent 799bda73e2
commit 3fb241157f

View File

@ -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 <robn@despairlabs.com>
*/
/*
@ -1109,6 +1110,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)
{