aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/mm.h19
-rw-r--r--include/linux/page-flags.h4
2 files changed, 0 insertions, 23 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 0986d19be0b7..9701210c6680 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -311,8 +311,6 @@ struct page {
311 311
312extern void FASTCALL(__page_cache_release(struct page *)); 312extern void FASTCALL(__page_cache_release(struct page *));
313 313
314#ifdef CONFIG_HUGETLB_PAGE
315
316static inline int page_count(struct page *page) 314static inline int page_count(struct page *page)
317{ 315{
318 if (PageCompound(page)) 316 if (PageCompound(page))
@@ -329,23 +327,6 @@ static inline void get_page(struct page *page)
329 327
330void put_page(struct page *page); 328void put_page(struct page *page);
331 329
332#else /* CONFIG_HUGETLB_PAGE */
333
334#define page_count(p) (atomic_read(&(p)->_count) + 1)
335
336static inline void get_page(struct page *page)
337{
338 atomic_inc(&page->_count);
339}
340
341static inline void put_page(struct page *page)
342{
343 if (put_page_testzero(page))
344 __page_cache_release(page);
345}
346
347#endif /* CONFIG_HUGETLB_PAGE */
348
349/* 330/*
350 * Multiple processes may "see" the same page. E.g. for untouched 331 * Multiple processes may "see" the same page. E.g. for untouched
351 * mappings of /dev/null, all processes see the same page full of 332 * mappings of /dev/null, all processes see the same page full of
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index f34767c5fc79..343083fec258 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -287,11 +287,7 @@ extern void __mod_page_state(unsigned long offset, unsigned long delta);
287#define ClearPageReclaim(page) clear_bit(PG_reclaim, &(page)->flags) 287#define ClearPageReclaim(page) clear_bit(PG_reclaim, &(page)->flags)
288#define TestClearPageReclaim(page) test_and_clear_bit(PG_reclaim, &(page)->flags) 288#define TestClearPageReclaim(page) test_and_clear_bit(PG_reclaim, &(page)->flags)
289 289
290#ifdef CONFIG_HUGETLB_PAGE
291#define PageCompound(page) test_bit(PG_compound, &(page)->flags) 290#define PageCompound(page) test_bit(PG_compound, &(page)->flags)
292#else
293#define PageCompound(page) 0
294#endif
295#define SetPageCompound(page) set_bit(PG_compound, &(page)->flags) 291#define SetPageCompound(page) set_bit(PG_compound, &(page)->flags)
296#define ClearPageCompound(page) clear_bit(PG_compound, &(page)->flags) 292#define ClearPageCompound(page) clear_bit(PG_compound, &(page)->flags)
297 293