On 4/9/2024 5:11 AM, Matthew Wilcox wrote:
On Mon, Apr 08, 2024 at 11:27:02PM -0700, Jane Chu wrote:
On 4/8/2024 12:42 PM, Matthew Wilcox (Oracle) wrote:
+++ b/include/linux/ksm.h
@@ -81,15 +81,9 @@ struct folio *ksm_might_need_to_copy(struct folio *folio,
void rmap_walk_ksm(struct folio *folio, struct rmap_walk_control *rwc);
void folio_migrate_ksm(struct folio *newfolio, struct folio *folio);
-
-#ifdef CONFIG_MEMORY_FAILURE
-void collect_procs_ksm(struct page *page, struct list_head *to_kill,
- int force_early);
-#endif
-
-#ifdef CONFIG_PROC_FS
+void collect_procs_ksm(struct folio *folio, struct page *page,
+ struct list_head *to_kill, int force_early);
long ksm_process_profit(struct mm_struct *);
-#endif /* CONFIG_PROC_FS */
Why is the #ifdef-#endif CONFIG_PROC_FS removed? In ksm.c,
ksm_process_profit() is defined within the config switch.
Yes, but there's no need to put ifdefs around function declarations.
All it does is add a rather bogus dependency on the CONFIG symbol.
There's no harm in having a declaration for a function which doesn't
exist.
I see, sounds good.
Reviewed-by: Jane Chu <jane.chu@xxxxxxxxxx>
-jane