From b01b717291f9336b35f0ca67019d769d843ed4be Mon Sep 17 00:00:00 2001 From: Eric Kim Date: Mon, 12 Oct 2026 17:09:23 +0900 Subject: [PATCH] Apply simplefs_writepage() only for kernels under 6.16 aops->writepage has been removed and replaced with writepages since 6.16. The current codebase still builds with simplefs_writepage() on kernels higher than 6.15, which gives unused-function warning. Add in macros to ensure kernel module builds with simplefs_writepage() for kernels under 6.16. --- file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/file.c b/file.c index 6d849c4..5919599 100644 --- a/file.c +++ b/file.c @@ -96,7 +96,8 @@ static int simplefs_readpage(struct file *file, struct page *page) /* Called by the page cache to write a dirty page to the physical disk (when * sync is called or when memory is needed). */ -#if SIMPLEFS_AT_LEAST(6, 8, 0) +#if SIMPLEFS_AT_LEAST(6, 16, 0) +#elif SIMPLEFS_AT_LEAST(6, 8, 0) static int simplefs_writepage(struct page *page, struct writeback_control *wbc) { struct folio *folio = page_folio(page);