From: Nicholas Krause <xerofoify@gmail.com>
To: akpm@linux-foundation.org
Cc: mgorman@suse.de, n-horiguchi@ah.jp.nec.com,
sasha.levin@oracle.com, Yalin.Wang@sonymobile.com,
jmarchan@redhat.com, kirill@shutemov.name, rientjes@google.com,
vbabka@suse.cz, aneesh.kumar@linux.vnet.ibm.com,
ebru.akagunduz@gmail.com, hannes@cmpxchg.org, mhocko@suse.cz,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH] mm:Make the function zap_huge_pmd bool
Date: Wed, 1 Jul 2015 14:27:57 -0400 [thread overview]
Message-ID: <1435775277-27381-1-git-send-email-xerofoify@gmail.com> (raw)
This makes the function zap_huge_pmd have a return type of bool
now due to this particular function always returning one or zero
as its return value.
Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
---
include/linux/huge_mm.h | 2 +-
mm/huge_memory.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index f10b20f..e83174e 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -19,7 +19,7 @@ extern struct page *follow_trans_huge_pmd(struct vm_area_struct *vma,
unsigned long addr,
pmd_t *pmd,
unsigned int flags);
-extern int zap_huge_pmd(struct mmu_gather *tlb,
+extern bool zap_huge_pmd(struct mmu_gather *tlb,
struct vm_area_struct *vma,
pmd_t *pmd, unsigned long addr);
extern int mincore_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd,
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index c107094..32b1993 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1384,11 +1384,11 @@ out:
return 0;
}
-int zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,
+bool zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,
pmd_t *pmd, unsigned long addr)
{
spinlock_t *ptl;
- int ret = 0;
+ int ret = false;
if (__pmd_trans_huge_lock(pmd, vma, &ptl) == 1) {
struct page *page;
@@ -1419,7 +1419,7 @@ int zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,
tlb_remove_page(tlb, page);
}
pte_free(tlb->mm, pgtable);
- ret = 1;
+ ret = true;
}
return ret;
}
--
2.1.4
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2015-07-01 18:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-01 18:27 Nicholas Krause [this message]
2015-07-02 7:26 ` Michal Hocko
2015-07-02 16:03 ` Theodore Ts'o
2015-07-02 16:08 ` nick
2015-07-02 17:07 ` nick
2015-07-03 14:46 ` Theodore Ts'o
2015-07-03 14:54 ` nick
2015-07-03 15:01 ` Michal Hocko
2015-07-03 15:03 ` nick
2015-07-03 16:49 ` Theodore Ts'o
2015-07-03 16:52 ` nick
2015-07-03 18:45 ` Theodore Ts'o
2015-07-03 19:49 ` nick
2015-07-03 20:13 ` Mel Gorman
2015-07-03 20:47 ` nick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1435775277-27381-1-git-send-email-xerofoify@gmail.com \
--to=xerofoify@gmail.com \
--cc=Yalin.Wang@sonymobile.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=ebru.akagunduz@gmail.com \
--cc=hannes@cmpxchg.org \
--cc=jmarchan@redhat.com \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mhocko@suse.cz \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=rientjes@google.com \
--cc=sasha.levin@oracle.com \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox