shmem: fix tmpfs to handle the huge= option properly
[cascardo/linux.git] / mm / shmem.c
index fd8b2b5..aec5b49 100644 (file)
@@ -1980,7 +1980,7 @@ unsigned long shmem_get_unmapped_area(struct file *file,
                                return addr;
                        sb = shm_mnt->mnt_sb;
                }
-               if (SHMEM_SB(sb)->huge != SHMEM_HUGE_NEVER)
+               if (SHMEM_SB(sb)->huge == SHMEM_HUGE_NEVER)
                        return addr;
        }