Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Ankit Agrawal and committed by
Alex Williamson
205e6d17 1c588bca

+11 -2
+11 -2
include/linux/memory-failure.h
··· 4 4 5 5 #include <linux/interval_tree.h> 6 6 7 - struct pfn_address_space; 8 - 9 7 struct pfn_address_space { 10 8 struct interval_tree_node node; 11 9 struct address_space *mapping; ··· 11 13 unsigned long pfn, pgoff_t *pgoff); 12 14 }; 13 15 16 + #ifdef CONFIG_MEMORY_FAILURE 14 17 int register_pfn_address_space(struct pfn_address_space *pfn_space); 15 18 void unregister_pfn_address_space(struct pfn_address_space *pfn_space); 19 + #else 20 + static inline int register_pfn_address_space(struct pfn_address_space *pfn_space) 21 + { 22 + return -EOPNOTSUPP; 23 + } 24 + 25 + static inline void unregister_pfn_address_space(struct pfn_address_space *pfn_space) 26 + { 27 + } 28 + #endif /* CONFIG_MEMORY_FAILURE */ 16 29 17 30 #endif /* _LINUX_MEMORY_FAILURE_H */