I think you should remove the VM_CHECKNODE to set_vm_checknode set_vm_checknode(vm_flags_t *vm_flags, unsigned long flags) { if (flags & VM_CHECKNODE && is_set_cdmmask()) *vm_flags |= VM_CHECKNODE | ((((flags >> MAP_HUGE_SHIFT) & MAP_HUGE_MASK) << CHECKNODE_BITS) & CHECKNODE_MASK); }
VM_CHECKNODE has been checked before the set_vm_checknode function is used. Maybe we can put the check into set_vm_checknode(). What do you think?
mm/mmap.c if (flags & MAP_CHECKNODE) set_vm_checknode(&vm_flags, flags);
Thanks, Bixuan Cui