[PATCH 0/2] refactor shmem_get_unmapped_area()

From: Toshi Kani
Date: Fri Sep 09 2016 - 18:26:12 EST


shmem_get_unmapped_area() provides a functionality similar
to __thp_get_unmapped_area() as both allocate a pmd-aligned
address. This patchset changes shmem_get_unmapped_area()
to call __thp_get_unmapped_area() to share the code.

Patch 1 fixes a bug in shmem_get_unmapped_area() first.
Patch 2 changes shmem_get_unmapped_area() to call
__thp_get_unmapped_area() for sharing the code.

This patch-set applies on top of my patchset below.
https://lkml.org/lkml/2016/8/29/560

---
Toshi Kani (2):
1/2 shmem: fix tmpfs to handle the huge= option properly
2/2 shmem: call __thp_get_unmapped_area to alloc a pmd-aligned addr

---
include/linux/huge_mm.h | 10 +++++++
mm/shmem.c | 70 ++++++++++---------------------------------------
2 files changed, 24 insertions(+), 56 deletions(-)