And that code is actually fairly recent. We _used_ to do this right, and 
the code was

if (vm_flags & VM_LOCKED) {
mm->locked_vm += len >> PAGE_SHIFT;
make_pages_present(addr, addr + len);

and we intentionally did _not_ pass in the vma, but we broke it a couple
of months ago in commit ba470de43188cdbff795b5da43a1474523c6c2fb ("mmap:
handle mlocked pages during map, remap, unmap").

Guilty parties added to Cc:

-- Linus Torvalds

そして、オイラはCCされましたとさ。くすん ;)