Both the tenant and landlord has the right to terminate the contract in advance and this can not be foreseen. If the landlord wish to move back earlier, he/she will need to terminate the contract and the notice period stated in your agreement applies. 

E.g. In Sweden, the landlord has 3 calendar month's notice period.