The patch titled Subject: zmalloc: hide unused lock_zspage has been added to the -mm tree. Its filename is mm-zsmalloc-make-several-functions-and-a-struct-static-fix.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-zsmalloc-make-several-functions-and-a-struct-static-fix.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-zsmalloc-make-several-functions-and-a-struct-static-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Arnd Bergmann <arnd@xxxxxxxx> Subject: zmalloc: hide unused lock_zspage Making lock_zspage() static revealed that it is unused in some confiurations: mm/zsmalloc.c:931:13: error: 'lock_zspage' defined but not used [-Werror=unused-function] I considered moving it into the same #ifdef that hides its user, but it seems better to keep it close to trylock_zspage() etc, so this marks it __maybe_unused() to let the compiler drop it without warning about it. Link: http://lkml.kernel.org/r/20180706130924.3891230-1-arnd@xxxxxxxx Fixes: 0de664ada6b6 ("mm/zsmalloc.c: make several functions and a struct static") Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx> Cc: Minchan Kim <minchan@xxxxxxxxxx> Cc: Colin Ian King <colin.king@xxxxxxxxxxxxx> Cc: Sergey Senozhatsky <sergey.senozhatsky.work@xxxxxxxxx> Cc: Nick Desaulniers <nick.desaulniers@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/zsmalloc.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff -puN mm/zsmalloc.c~mm-zsmalloc-make-several-functions-and-a-struct-static-fix mm/zsmalloc.c --- a/mm/zsmalloc.c~mm-zsmalloc-make-several-functions-and-a-struct-static-fix +++ a/mm/zsmalloc.c @@ -924,19 +924,6 @@ static void reset_page(struct page *page page->freelist = NULL; } -/* - * To prevent zspage destroy during migration, zspage freeing should - * hold locks of all pages in the zspage. - */ -static void lock_zspage(struct zspage *zspage) -{ - struct page *page = get_first_page(zspage); - - do { - lock_page(page); - } while ((page = get_next_page(page)) != NULL); -} - static int trylock_zspage(struct zspage *zspage) { struct page *cursor, *fail; @@ -1814,6 +1801,19 @@ static enum fullness_group putback_zspag } #ifdef CONFIG_COMPACTION +/* + * To prevent zspage destroy during migration, zspage freeing should + * hold locks of all pages in the zspage. + */ +static void lock_zspage(struct zspage *zspage) +{ + struct page *page = get_first_page(zspage); + + do { + lock_page(page); + } while ((page = get_next_page(page)) != NULL); +} + static struct dentry *zs_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) { _ Patches currently in -mm which might be from arnd@xxxxxxxx are ocfs2-dlmglue-clean-up-timestamp-handling.patch shmem-use-monotonic-time-for-i_generation.patch mm-zsmalloc-make-several-functions-and-a-struct-static-fix.patch procfs-uptime-use-ktime_get_boottime_ts64.patch crash-print-timestamp-using-time64_t.patch nilfs2-use-64-bit-superblock-timstamps.patch reiserfs-use-monotonic-time-for-j_trans_start_time.patch reiserfs-remove-obsolete-print_time-function.patch reiserfs-change-j_timestamp-type-to-time64_t.patch fat-propagate-64-bit-inode-timestamps.patch adfs-use-timespec64-for-time-conversion.patch vmcore-hide-vmcoredd_mmap_dumps-for-nommu-builds.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html