Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1490533 > unrolled thread

[PATCH 1/3] shmem: fix tmpfs to handle the huge= option properly

Started byHugh Dickins <hughd@google.com>
First post2016-09-24 05:30 +0200
Last post2016-09-24 05:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 1/3] shmem: fix tmpfs to handle the huge= option properly Hugh Dickins <hughd@google.com> - 2016-09-24 05:30 +0200

#1490533 — [PATCH 1/3] shmem: fix tmpfs to handle the huge= option properly

FromHugh Dickins <hughd@google.com>
Date2016-09-24 05:30 +0200
Subject[PATCH 1/3] shmem: fix tmpfs to handle the huge= option properly
Message-ID<skLP3-4b0-7@gated-at.bofh.it>
From: Toshi Kani <toshi.kani@hpe.com>

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>
---

 mm/shmem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 4.8-rc7/mm/shmem.c	2016-08-14 20:17:02.388843463 -0700
+++ linux/mm/shmem.c	2016-09-22 19:41:29.057848626 -0700
@@ -1980,7 +1980,7 @@ unsigned long shmem_get_unmapped_area(st
 				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;
 	}
 

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web