]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
mm: allow pgtable_page_ctor() to fail
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Thu, 14 Nov 2013 22:31:20 +0000 (14:31 -0800)
committerIshan Mittal <imittal@nvidia.com>
Wed, 30 Apr 2014 12:44:52 +0000 (18:14 +0530)
Change pgtable_page_ctor() return type from void to bool.  Returns true,
if initialization is successful and false otherwise.

Current implementation never fails, but it will change later.
(cherry picked from commit 390f44e2aa2ab83f08231d7d05f066dc3494490e)

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/mm.h

index de2a2f2bf7089f9344695217a897f1d5fd1f88e0..0b0be4d815dcddb166207c4a30db225392644aa3 100644 (file)
@@ -1261,10 +1261,11 @@ static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long a
 #define pte_lockptr(mm, pmd)   ({(void)(pmd); &(mm)->page_table_lock;})
 #endif /* USE_SPLIT_PTLOCKS */
 
-static inline void pgtable_page_ctor(struct page *page)
+static inline bool pgtable_page_ctor(struct page *page)
 {
        pte_lock_init(page);
        inc_zone_page_state(page, NR_PAGETABLE);
+       return true;
 }
 
 static inline void pgtable_page_dtor(struct page *page)