linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Prasad Joshi <prasadjoshi124@gmail.com>
To: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	Anand Mitra <mitra@kqinfotech.com>
Subject: [RFC][PATCH 20/25]: Propagating GFP_NOFS inside __vmalloc()
Date: Fri, 11 Mar 2011 21:03:26 +0000	[thread overview]
Message-ID: <AANLkTimUaYZreB9uV3TmNy+293tPDeST9QgC7-uAQNWx@mail.gmail.com> (raw)

Signed-off-by: Anand Mitra <mitra@kqinfotech.com>
Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
---
diff --git a/mm/memory.c b/mm/memory.c
index 5823698..dc4964e 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -433,9 +433,9 @@ int __pte_alloc(struct mm_struct *mm, struct
vm_area_struct *vma,
    return 0;
 }

-int __pte_alloc_kernel(pmd_t *pmd, unsigned long address)
+int __pte_alloc_kernel(pmd_t *pmd, unsigned long address, gfp_t gfp_mask)
 {
-   pte_t *new = pte_alloc_one_kernel(&init_mm, address);
+   pte_t *new = __pte_alloc_one_kernel(&init_mm, address, gfp_mask);
    if (!new)
        return -ENOMEM;

@@ -3343,9 +3343,10 @@ int handle_mm_fault(struct mm_struct *mm,
struct vm_area_struct *vma,
  * Allocate page upper directory.
  * We've already handled the fast-path in-line.
  */
-int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
+int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address,
+       gfp_t gfp_mask)
 {
-   pud_t *new = pud_alloc_one(mm, address);
+   pud_t *new = __pud_alloc_one(mm, address, gfp_mask);
    if (!new)
        return -ENOMEM;

@@ -3366,9 +3367,10 @@ int __pud_alloc(struct mm_struct *mm, pgd_t
*pgd, unsigned long address)
  * Allocate page middle directory.
  * We've already handled the fast-path in-line.
  */
-int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
+int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address,
+       gfp_t gfp_mask)
 {
-   pmd_t *new = pmd_alloc_one(mm, address);
+   pmd_t *new = __pmd_alloc_one(mm, address, gfp_mask);
    if (!new)
        return -ENOMEM;

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

                 reply	other threads:[~2011-03-11 21:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=AANLkTimUaYZreB9uV3TmNy+293tPDeST9QgC7-uAQNWx@mail.gmail.com \
    --to=prasadjoshi124@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=mitra@kqinfotech.com \
    /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