On 6/20/23 6:17 AM, John Hubbard wrote:
MADV_PAGEOUT, MADV_POPULATE_READ, MADV_COLLAPSE are conditionallyI've not looked in detail. But it seems like your first revision was merged
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.
So consolidate and move them all to vm_util.h, which fixes the build
failure.
An alternative approach from Muhammad Usama Anjum was: rely on "make
headers" being required, and include asm-generic/mman-common.h. This
works in the sense that it builds, but it still generates warnings about
duplicate MADV_* symbols, and the goal here is to get a fully clean (no
warnings) build here.
and after that my cleanup has also been merged. My cleanup patch is adding
correct header files and removing these duplicate defines: It is in
mm-stable now.
https://lore.kernel.org/all/20230619232244.81CB3C433C0@xxxxxxxxxxxxxxx