From patchwork Wed Nov 8 18:28:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13450386 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B725C4167D for ; Wed, 8 Nov 2023 18:28:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 99E778D00C6; Wed, 8 Nov 2023 13:28:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 94ECF8D00C3; Wed, 8 Nov 2023 13:28:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7EFA48D00C6; Wed, 8 Nov 2023 13:28:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 7126C8D00C3 for ; Wed, 8 Nov 2023 13:28:33 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 4C461804BF for ; Wed, 8 Nov 2023 18:28:33 +0000 (UTC) X-FDA: 81435622506.04.86E8E31 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf29.hostedemail.com (Postfix) with ESMTP id 3382512001B for ; Wed, 8 Nov 2023 18:28:30 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=aDoiH7YL; dmarc=none; spf=none (imf29.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699468111; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ge2YEmHJGHGEQpMO5GGjXgZSkkH9dVGDapYpajDMgdw=; b=mMqfEpbKHEtajeVfJqnTCtBPl5tSUHkRjfTuhgH6ow5mf1r5Q0BzJ9wg14bWEIb1YUu9LS fqk4ojj1pV5Eg9Pn33tvwitG1fWsQNjftTz+sL6gl9aLiHx6Vl64ATDynre6ISHdxggjkQ h6LGRNwkI7iNX/U7fYFaiVCY6aaFeb0= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=aDoiH7YL; dmarc=none; spf=none (imf29.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1699468111; a=rsa-sha256; cv=none; b=slFJeVcA8eN5Lupm4kfHGdkCvuuWbkKOyl4MiNwcQY0n0k3XKotbiKWj/GcgPr7AQ8G1FG Kw03VYljuFYiYK210pMnCCl11L7gJlqum1t880MvPcq0hynG+CB1SOBKk2p7zne91Hf/XU Nzm7ZiV5wk1S5+t6EGJY41VwmFN+bik= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=ge2YEmHJGHGEQpMO5GGjXgZSkkH9dVGDapYpajDMgdw=; b=aDoiH7YLhue1Nexe31uEEZyfyo EetNsAeMZd+0zQWLt9CU0+7UOQpKbvm+bGiM+hEHNoMcyBW67xaiUhhP5L4rz0jCYbh1ghbVJja48 b/a6HyvzGsth+7grDkj6Q9FPnc/D8ayDpbrt90+WbEI3fZE4Fc5aasKUqQMfdrsSnstQ/94z/+X5A 6yeRDk5pGHYPFmMNpgo9marnrmAvwn+YO47uXeK024NJoaAXN5y1Toc9PGa148Ky4WcXd6SfRIBVi vuNj/KlJMQpgrjby2aSPnQEyFLpg405UmUtdjdQPhvsO/W0lWm/rs/F7E+NtmjdFJFqrlrLxjpsGy 7bSEV4Pg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1r0nHf-002WdQ-C3; Wed, 08 Nov 2023 18:28:11 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , Naoya Horiguchi , linux-mm@kvack.org Subject: [PATCH 6/6] mm: Remove invalidate_inode_page() Date: Wed, 8 Nov 2023 18:28:09 +0000 Message-Id: <20231108182809.602073-7-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20231108182809.602073-1-willy@infradead.org> References: <20231108182809.602073-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 3382512001B X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: wwrh5icixfhjq66hqfkkbiwe3zonxigk X-HE-Tag: 1699468110-294953 X-HE-Meta: U2FsdGVkX19H3eiX2fRNkf6ztLAtl3jMMhOWEWFA6OFnFXXBi8ihJyNGPspiRN6QFKnxXPdgfxuCzTPJsgJ7ZrmIjWckNvZODTcuOq4droSl9dYaHul5MLbVG5HueJ1nl0wToyMZ1AtOemCNUcEmUD+P68DPM7YdVEEaWDArc7Ra+sq9m0XiEyeO0lr+nYH6YHxLnhO+mJGqPzdEk+r3q5+gi1QoOUoBn6A9xKGkfTk/xpFRVwOd+zRahl5j9swo/gY0pAxr4ECTy9xZpECHjVnWPXphNB49URdcmqq9edOvGIwsBZLNGHqOxzegk0bG0HQpYe6v/cCWFXuzF/5TVeQTOlG10oTWoQVE8kOEw3QzbATPXwoRxuuBe2b8056D+2r9YO7H3R/syRnsEon+9kRbh5psYuYRfSo9J7dvq3/hVxuOS96RCI3EUtg+cJgrPm423jM57Bz/x2c9u2iL29o6ZWw72cIuy2pJnIlEeV3k4PejlrcWeTyEb20wvwftwWMW7SGOGzw3anPcRRbgyCEvTFSHOgjbpbaNzkIgrdLvPHbSoCo4WmxLUbvvsHJztn3detX9Sr3ULGgQ7Cs73XIlTbQBZFoGmtuX2sERdj3sdcvyao26kSDoT3qR+Ma2q3pMICWmMqMSyRgxbG0huJN2gmY3+yQErQn3c1Iu1Ot7um6D+BtQNrtacsC9ReUlIPsqs7bgg4rhr78/D8RA85f7+NqVjjJxpjxnlOBPhMjPYswz9h1tN06YXxSYaCLN1MD6JNu9Z7NROR+K57M9JQliMN63rVNivUuB8pMpIM3m8UoabAUgxU8FkCouLSRDCyV0OTZinmUftadPshYfsIxHtnXAB6njvVf0fqcOUSl0OO/kf+P2aUun7Lw28y6NHEqD2XOHdWz10/0rAik9mEXumz1uSXOl9amFNXsjGgDSWQRz2ZonSZKSEBrwyv4dsNldcYvT89LBvgomUrg 7MCwah9t qCiOoX8WMKpGoRGyhVPhvpI4D+6egvdlxOWpu4z1cwQjMOSN4FBlmEDBaGHAi0yyVMRELWcgrFFPAvKjilANzBHs/K5LRtWv5mscX9sE2Mmw0ZY6W8BIlEub79HyC84Om66tOek+Ostit7v6FB1EV+qVOAaCvdjSanjs7Pkkz6mCNVU5IBrJnAa2pYS4W1inJg9FHzfIQCmr3PBPXhjvL0hpvCJrpWpjqkh2g X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: All callers are now converted to call mapping_evict_folio(). Signed-off-by: Matthew Wilcox (Oracle) --- mm/internal.h | 1 - mm/truncate.c | 11 ++--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/mm/internal.h b/mm/internal.h index 687d89d317d0..7e84ec0219b1 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -139,7 +139,6 @@ int truncate_inode_folio(struct address_space *mapping, struct folio *folio); bool truncate_inode_partial_folio(struct folio *folio, loff_t start, loff_t end); long mapping_evict_folio(struct address_space *mapping, struct folio *folio); -long invalidate_inode_page(struct page *page); unsigned long mapping_try_invalidate(struct address_space *mapping, pgoff_t start, pgoff_t end, unsigned long *nr_failed); diff --git a/mm/truncate.c b/mm/truncate.c index 1d516e51e29d..52e3a703e7b2 100644 --- a/mm/truncate.c +++ b/mm/truncate.c @@ -294,13 +294,6 @@ long mapping_evict_folio(struct address_space *mapping, struct folio *folio) return remove_mapping(mapping, folio); } -long invalidate_inode_page(struct page *page) -{ - struct folio *folio = page_folio(page); - - return mapping_evict_folio(folio_mapping(folio), folio); -} - /** * truncate_inode_pages_range - truncate range of pages specified by start & end byte offsets * @mapping: mapping to truncate @@ -559,9 +552,9 @@ unsigned long invalidate_mapping_pages(struct address_space *mapping, EXPORT_SYMBOL(invalidate_mapping_pages); /* - * This is like invalidate_inode_page(), except it ignores the page's + * This is like mapping_evict_folio(), except it ignores the folio's * refcount. We do this because invalidate_inode_pages2() needs stronger - * invalidation guarantees, and cannot afford to leave pages behind because + * invalidation guarantees, and cannot afford to leave folios behind because * shrink_page_list() has a temp ref on them, or because they're transiently * sitting in the folio_add_lru() caches. */