On 6/2/23 6:33 AM, John Hubbard wrote:
MADV_PAGEOUT, MADV_POPULATE_READ, MADV_COLLAPSE are conditionallyThere is a better way. Just like I've mentioned that building in-tree
defined as necessary. However, that was being done in .c files, and a
new build failure came up that would have been automatically avoided had
these been in a common header file.
kernel headers and then mm selftests don't produce any build failures as
they pick up in-tree compiled kernel header files. Don't move these
definations to vm_util.h. Instead include asm-generic/mman-common.h which
has all these definitions already. I've just removed what you have removed
in this patch and include asm-generic/mman-common.h. It builds fine. But
then there are more duplicated definition warnings.