lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220922110935.1495099-1-cuigaosheng1@huawei.com>
Date:   Thu, 22 Sep 2022 19:09:35 +0800
From:   Gaosheng Cui <cuigaosheng1@...wei.com>
To:     <akpm@...ux-foundation.org>, <yuzhao@...gle.com>,
        <heftig@...hlinux.org>, <suleiman@...gle.com>,
        <bgeffon@...gle.com>, <arnd@...db.de>, <surenb@...gle.com>,
        <hughd@...gle.com>, <willy@...radead.org>, <peterx@...hat.com>,
        <cuigaosheng1@...wei.com>
CC:     <linux-kernel@...r.kernel.org>
Subject: [PATCH] mm: Remove unused inline functions from include/linux/mm_inline.h

Remove the following unused inline functions from mm_inline.h:
1. All uses of add_page_to_lru_list_tail() have
been removed since commit 7a3dbfe8a52b ("mm/swap: convert
lru_deactivate_file to a folio_batch"), and it can be replaced by
lruvec_add_folio_tail().

2. All uses of __clear_page_lru_flags() have
been removed since commit 188e8caee968 ("mm/swap: convert
__page_cache_release() to use a folio"), and it can be replaced
by __folio_clear_lru_flags().

They are useless, so remove them.

Signed-off-by: Gaosheng Cui <cuigaosheng1@...wei.com>
---
 include/linux/mm_inline.h | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h
index 4949eda9a9a2..e8ed225d8f7c 100644
--- a/include/linux/mm_inline.h
+++ b/include/linux/mm_inline.h
@@ -76,11 +76,6 @@ static __always_inline void __folio_clear_lru_flags(struct folio *folio)
 	__folio_clear_unevictable(folio);
 }
 
-static __always_inline void __clear_page_lru_flags(struct page *page)
-{
-	__folio_clear_lru_flags(page_folio(page));
-}
-
 /**
  * folio_lru_list - Which LRU list should a folio be on?
  * @folio: The folio to test.
@@ -348,12 +343,6 @@ void lruvec_add_folio_tail(struct lruvec *lruvec, struct folio *folio)
 	list_add_tail(&folio->lru, &lruvec->lists[lru]);
 }
 
-static __always_inline void add_page_to_lru_list_tail(struct page *page,
-				struct lruvec *lruvec)
-{
-	lruvec_add_folio_tail(lruvec, page_folio(page));
-}
-
 static __always_inline
 void lruvec_del_folio(struct lruvec *lruvec, struct folio *folio)
 {
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ