aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mm/huge_memory.c
diff options
context:
space:
mode:
authorYang Shi <yang.shi@linaro.org>2016-05-20 16:57:30 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-20 17:58:30 -0700
commit340a43bed674a70308f196f2a61ec0b01f8a14d9 (patch)
tree6322ff7a252650d7a7face60e648a2add7d12668 /mm/huge_memory.c
parentmm,oom: speed up select_bad_process() loop (diff)
downloadwireguard-linux-340a43bed674a70308f196f2a61ec0b01f8a14d9.tar.xz
wireguard-linux-340a43bed674a70308f196f2a61ec0b01f8a14d9.zip
mm: thp: simplify the implementation of mk_huge_pmd()
The implementation of mk_huge_pmd looks verbose, it could be just simplified to one line code. Signed-off-by: Yang Shi <yang.shi@linaro.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r--mm/huge_memory.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 66675eed67be..86eafd91c982 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -764,10 +764,7 @@ pmd_t maybe_pmd_mkwrite(pmd_t pmd, struct vm_area_struct *vma)
static inline pmd_t mk_huge_pmd(struct page *page, pgprot_t prot)
{
- pmd_t entry;
- entry = mk_pmd(page, prot);
- entry = pmd_mkhuge(entry);
- return entry;
+ return pmd_mkhuge(mk_pmd(page, prot));
}
static inline struct list_head *page_deferred_list(struct page *page)