Did you upload the 2.2 files at some point? If so, then you have some remnant files from that (files that don't exist in 2.1). Specifically, this is a 2.2-related upgrade script (that would try to run if we didn't block it with that message).
You could delete the contents of the src/XF/Install/Upgrade directory and replace them with the expected contents from the correct 2.1 version and that would clear the message. (There may be other 2.2 files present though they shouldn't generally cause errors if they're not called though there could still be a mix of unexpected files in some cases.)