mm: page_cache_add_speculative(): refactor out some code duplication