Skip to content

Commit

Permalink
mm/page_ext: move page_ext_operations definition under CONFIG_PAGE_EX…
Browse files Browse the repository at this point in the history
…TENSION

page_ext_operations should only be defined when CONFIG_PAGE_EXTENSION is
enabled.

Besides, this may detect missing reliance on CONFIG_PAGE_EXTENSION from
future Page Extension clients at compile time.

Link: https://lkml.kernel.org/r/20230717113227.1897173-4-shikemeng@huaweicloud.com
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
Kemeng Shi authored and Andrew Morton committed Aug 21, 2023
1 parent c6493f4 commit 67311a3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/linux/page_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

struct pglist_data;

#ifdef CONFIG_PAGE_EXTENSION
/**
* struct page_ext_operations - per page_ext client operations
* @offset: Offset to the client's data within page_ext. Offset is returned to
Expand All @@ -29,8 +30,6 @@ struct page_ext_operations {
bool need_shared_flags;
};

#ifdef CONFIG_PAGE_EXTENSION

/*
* The page_ext_flags users must set need_shared_flags to true.
*/
Expand Down

0 comments on commit 67311a3

Please sign in to comment.