[PATCH v3] mm/shmem: fix THP allocation and fallback loop