pull down to refresh

https://github.com/bitcoin/bitcoin/commit/172f006020965ae8763a0610845c051ed1e3b522

this one is for validation; the other link you posted is for mining.

if you look at the diff on github, just above the context is their best guess at the most relevant enclosing scope; and there you can see that the other commit you linked introduced the limit for the blocks generated by the CPU miner, while this commit enforces them in verification.