[PATCH 5.10.y] mm: avoid unsafe VMA hook invocation when error arises on mmap hook