~ubuntu-branches/debian/experimental/linux-tools/experimental

« back to all changes in this revision

Viewing changes to arch/arc/include/asm/pgalloc.h

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings
  • Date: 2014-02-02 16:57:49 UTC
  • mfrom: (1.1.10) (0.1.21 sid)
  • Revision ID: package-import@ubuntu.com-20140202165749-tw94o9t1t0a8txk6
Tags: 3.13-1~exp2
Merge changes from sid up to 3.12.6-3

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
pte_alloc_one(struct mm_struct *mm, unsigned long address)
106
106
{
107
107
        pgtable_t pte_pg;
 
108
        struct page *page;
108
109
 
109
110
        pte_pg = __get_free_pages(GFP_KERNEL | __GFP_REPEAT, __get_order_pte());
110
 
        if (pte_pg) {
111
 
                memzero((void *)pte_pg, PTRS_PER_PTE * 4);
112
 
                pgtable_page_ctor(virt_to_page(pte_pg));
 
111
        if (!pte_pg)
 
112
                return 0;
 
113
        memzero((void *)pte_pg, PTRS_PER_PTE * 4);
 
114
        page = virt_to_page(pte_pg);
 
115
        if (!pgtable_page_ctor(page)) {
 
116
                __free_page(page);
 
117
                return 0;
113
118
        }
114
119
 
115
120
        return pte_pg;