modify pgdir_walk