[PATCH 6.17 532/563] mm/ksm: fix flag-dropping behavior in ksm_madvise