Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59BFFC433F5 for ; Sun, 23 Jan 2022 23:58:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235435AbiAWX6n (ORCPT ); Sun, 23 Jan 2022 18:58:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235155AbiAWX6k (ORCPT ); Sun, 23 Jan 2022 18:58:40 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BAFFC06173B for ; Sun, 23 Jan 2022 15:58:40 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 45447B80DC7 for ; Sun, 23 Jan 2022 23:58:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC962C340E3; Sun, 23 Jan 2022 23:58:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1642982318; bh=Yk8FTVJEX9940HGvMVKZG6fBvc6yamg9WlHhhKaOkO0=; h=Date:From:To:Subject:From; b=ZWYgavUPJkpuzDGgHCUJXXnLHMadNIjPGJZvXoS6WX3L84orXxZZ1TsF/yOkozAbQ oGYj8Q84OI/gbm8I9xC/GKgLvmtRoFLFEiGXDwvQN+e2305ZXh3mTTj3L1jlQniFOd iM2VjviBtyOHu6jMNMA90uhXkrPaFLSYvV9xLMVY= Date: Sun, 23 Jan 2022 15:58:37 -0800 From: akpm@linux-foundation.org To: ddstreet@ieee.org, geert@linux-m68k.org, hch@lst.de, hughd@google.com, jgross@suse.com, Konrad.wilk@oracle.com, mm-commits@vger.kernel.org, sjenning@redhat.com, vitaly.wool@konsulko.com, willy@infradead.org Subject: [merged] frontswap-remove-frontswap_curr_pages.patch removed from -mm tree Message-ID: <20220123235837.YgkrFbYwh%akpm@linux-foundation.org> User-Agent: s-nail v14.8.16 Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org The patch titled Subject: frontswap: remove frontswap_curr_pages has been removed from the -mm tree. Its filename was frontswap-remove-frontswap_curr_pages.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Christoph Hellwig Subject: frontswap: remove frontswap_curr_pages frontswap_curr_pages is never called, so remove it. Link: https://lkml.kernel.org/r/20211224062246.1258487-6-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Juergen Gross Cc: Dan Streetman Cc: Geert Uytterhoeven Cc: Hugh Dickins Cc: Konrad Rzeszutek Wilk Cc: Matthew Wilcox (Oracle) Cc: Seth Jennings Cc: Vitaly Wool Signed-off-by: Andrew Morton --- include/linux/frontswap.h | 1 - mm/frontswap.c | 28 ---------------------------- 2 files changed, 29 deletions(-) --- a/include/linux/frontswap.h~frontswap-remove-frontswap_curr_pages +++ a/include/linux/frontswap.h @@ -24,7 +24,6 @@ struct frontswap_ops { }; extern void frontswap_register_ops(struct frontswap_ops *ops); -extern unsigned long frontswap_curr_pages(void); extern bool __frontswap_test(struct swap_info_struct *, pgoff_t); extern void __frontswap_init(unsigned type, unsigned long *map); --- a/mm/frontswap.c~frontswap-remove-frontswap_curr_pages +++ a/mm/frontswap.c @@ -330,34 +330,6 @@ void __frontswap_invalidate_area(unsigne } EXPORT_SYMBOL(__frontswap_invalidate_area); -static unsigned long __frontswap_curr_pages(void) -{ - unsigned long totalpages = 0; - struct swap_info_struct *si = NULL; - - assert_spin_locked(&swap_lock); - plist_for_each_entry(si, &swap_active_head, list) - totalpages += atomic_read(&si->frontswap_pages); - return totalpages; -} - -/* - * Count and return the number of frontswap pages across all - * swap devices. This is exported so that backend drivers can - * determine current usage without reading debugfs. - */ -unsigned long frontswap_curr_pages(void) -{ - unsigned long totalpages = 0; - - spin_lock(&swap_lock); - totalpages = __frontswap_curr_pages(); - spin_unlock(&swap_lock); - - return totalpages; -} -EXPORT_SYMBOL(frontswap_curr_pages); - static int __init init_frontswap(void) { #ifdef CONFIG_DEBUG_FS _ Patches currently in -mm which might be from hch@lst.de are