From: Mario Leinweber <marioleinweber@web.de>
To: akpm@linux-foundation.org
Cc: mingo@kernel.org, kirill.shutemov@linux.intel.com,
aneesh.kumar@linux.vnet.ibm.com, mhocko@suse.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Mario Leinweber <marioleinweber@web.de>
Subject: [PATCH] mm/gup: Fixed coding style error and warnings.
Date: Tue, 13 Feb 2018 14:17:22 -0500 [thread overview]
Message-ID: <20180213191722.11228-1-marioleinweber@web.de> (raw)
Signed-off-by: Mario Leinweber <marioleinweber@web.de>
---
mm/gup.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/mm/gup.c b/mm/gup.c
index 1b46e6e74881..7e463042df4a 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -141,6 +141,7 @@ static struct page *follow_page_pte(struct vm_area_struct *vma,
if (flags & FOLL_SPLIT && PageTransCompound(page)) {
int ret;
+
get_page(page);
pte_unmap_unlock(ptep, ptl);
lock_page(page);
@@ -272,6 +273,7 @@ static struct page *follow_pmd_mask(struct vm_area_struct *vma,
}
if (flags & FOLL_SPLIT) {
int ret;
+
page = pmd_page(*pmd);
if (is_huge_zero_page(page)) {
spin_unlock(ptl);
@@ -531,7 +533,7 @@ static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma,
* reCOWed by userspace write).
*/
if ((ret & VM_FAULT_WRITE) && !(vma->vm_flags & VM_WRITE))
- *flags |= FOLL_COW;
+ *flags |= FOLL_COW;
return 0;
}
@@ -667,12 +669,14 @@ static long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
vma = find_extend_vma(mm, start);
if (!vma && in_gate_area(mm, start)) {
int ret;
+
ret = get_gate_page(mm, start & PAGE_MASK,
gup_flags, &vma,
pages ? &pages[i] : NULL);
if (ret)
return i ? : ret;
page_mask = 0;
+
goto next_page;
}
@@ -696,6 +700,7 @@ static long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
page = follow_page_mask(vma, start, foll_flags, &page_mask);
if (!page) {
int ret;
+
ret = faultin_page(tsk, vma, start, &foll_flags,
nonblocking);
switch (ret) {
@@ -1635,7 +1640,7 @@ static int gup_pmd_range(pud_t pud, unsigned long addr, unsigned long end,
PMD_SHIFT, next, write, pages, nr))
return 0;
} else if (!gup_pte_range(pmd, addr, next, write, pages, nr))
- return 0;
+ return 0;
} while (pmdp++, addr = next, addr != end);
return 1;
--
2.14.3
--
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:[~2018-02-13 19:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-13 19:17 Mario Leinweber [this message]
2018-02-13 19:32 ` Joe Perches
2018-02-13 19:36 ` Matthew Wilcox
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=20180213191722.11228-1-marioleinweber@web.de \
--to=marioleinweber@web.de \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=mingo@kernel.org \
/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