Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mm: allow pgtable_page_ctor() to fail

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.

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>

authored by

Kirill A. Shutemov and committed by
Linus Torvalds
390f44e2 f8c6d30b

+2 -1
+2 -1
include/linux/mm.h
··· 1338 1338 #define pte_lockptr(mm, pmd) ({(void)(pmd); &(mm)->page_table_lock;}) 1339 1339 #endif /* USE_SPLIT_PTE_PTLOCKS */ 1340 1340 1341 - static inline void pgtable_page_ctor(struct page *page) 1341 + static inline bool pgtable_page_ctor(struct page *page) 1342 1342 { 1343 1343 pte_lock_init(page); 1344 1344 inc_zone_page_state(page, NR_PAGETABLE); 1345 + return true; 1345 1346 } 1346 1347 1347 1348 static inline void pgtable_page_dtor(struct page *page)