Skip to content

Commit

Permalink
config: fix page_mapping test
Browse files Browse the repository at this point in the history
It always failed from "unused variable" warnings-errors. The resulting
`#define page_mapping(...)` happend to work because it always overrode
the kernel's function prototype, but that's brittle.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Tino Reichardt <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes #16479
  • Loading branch information
robn authored and behlendorf committed Sep 18, 2024
1 parent 0807423 commit 7cdfda3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/kernel-mm-pagemap.m4
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MM_PAGE_MAPPING], [
ZFS_LINUX_TEST_SRC([page_mapping], [
#include <linux/pagemap.h>
],[
struct page *p = NULL;
struct address_space *m = page_mapping(NULL);
struct address_space *m;
m = page_mapping(NULL);
])
])
AC_DEFUN([ZFS_AC_KERNEL_MM_PAGE_MAPPING], [
Expand Down

0 comments on commit 7cdfda3

Please sign in to comment.