]> git.baikalelectronics.ru Git - kernel.git/commit
shmem: fix tmpfs to handle the huge= option properly
authorToshi Kani <toshi.kani@hpe.com>
Sat, 24 Sep 2016 03:21:56 +0000 (20:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 24 Sep 2016 18:20:01 +0000 (11:20 -0700)
commite4bcdb206fa4a6f4197f1c44ca4c2acb90e42481
treeb16cd2c7b0213c55dfe2d8b867e54745b403a861
parent6f0492d57521ebcb7738041489264027c3c20a0a
shmem: fix tmpfs to handle the huge= option properly

shmem_get_unmapped_area() checks SHMEM_SB(sb)->huge incorrectly, which
leads to a reversed effect of "huge=" mount option.

Fix the check in shmem_get_unmapped_area().

Note, the default value of SHMEM_SB(sb)->huge remains as
SHMEM_HUGE_NEVER.  User will need to specify "huge=" option to enable
huge page mappings.

Reported-by: Hillf Danton <hillf.zj@alibaba-inc.com>
Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/shmem.c