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.
reply
Or is it this from July 2010:
https://github.com/bitcoin/bitcoin/commit/a30b56ebe76ffff9f9cc8a6667186179413c6349
reply
Is this the first time an explicit block size limit was introduced in Bitcoin (sep 2010)?
https://github.com/bitcoin/bitcoin/commit/172f006020965ae8763a0610845c051ed1e3b522