fs/proc/vmcore.c: put if tests in the top of the while loop to reduce duplication