struct address_space *page_mapping(struct page *page) { unsigned long mapping; /* This happens if someone calls flush_dcache_page on slab page */ if (unlikely(PageSlab(page))) return NULL;
if (unlikely(PageSwapCache(page))) { swp_entry_t entry;
entry.val = page_private(page); return swap_address_space(entry);
} mapping = (unsigned long)page->mapping; if (mapping & PAGE_MAPPING_FLAGS) return NULL; return page->mapping; }