Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f096e59e authored by Huang Shijie's avatar Huang Shijie Committed by Linus Torvalds
Browse files

include/linux/mm.h: remove unneeded ifdef



The check code for CONFIG_SWAP is redundant, because there is a
non-CONFIG_SWAP version for PageSwapCache() which just returns 0.

Signed-off-by: default avatarHuang Shijie <shijie8@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c9d0bf24
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -643,12 +643,9 @@ static inline struct address_space *page_mapping(struct page *page)
	struct address_space *mapping = page->mapping;

	VM_BUG_ON(PageSlab(page));
#ifdef CONFIG_SWAP
	if (unlikely(PageSwapCache(page)))
		mapping = &swapper_space;
	else
#endif
	if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON))
	else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON))
		mapping = NULL;
	return mapping;
}