mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-30 15:24:31 -04:00
mm: add stubs for PFNMAP memory failure registration functions
Add stubs to address CONFIG_MEMORY_FAILURE disabled. Suggested-by: Alex Williamson <alex@shazbot.org> Signed-off-by: Ankit Agrawal <ankita@nvidia.com> Link: https://lore.kernel.org/r/20260115202849.2921-2-ankita@nvidia.com Signed-off-by: Alex Williamson <alex@shazbot.org>
This commit is contained in:
committed by
Alex Williamson
parent
1c588bca3b
commit
205e6d17cd
@@ -4,8 +4,6 @@
|
||||
|
||||
#include <linux/interval_tree.h>
|
||||
|
||||
struct pfn_address_space;
|
||||
|
||||
struct pfn_address_space {
|
||||
struct interval_tree_node node;
|
||||
struct address_space *mapping;
|
||||
@@ -13,7 +11,18 @@ struct pfn_address_space {
|
||||
unsigned long pfn, pgoff_t *pgoff);
|
||||
};
|
||||
|
||||
#ifdef CONFIG_MEMORY_FAILURE
|
||||
int register_pfn_address_space(struct pfn_address_space *pfn_space);
|
||||
void unregister_pfn_address_space(struct pfn_address_space *pfn_space);
|
||||
#else
|
||||
static inline int register_pfn_address_space(struct pfn_address_space *pfn_space)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline void unregister_pfn_address_space(struct pfn_address_space *pfn_space)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_MEMORY_FAILURE */
|
||||
|
||||
#endif /* _LINUX_MEMORY_FAILURE_H */
|
||||
|
||||
Reference in New Issue
Block a user