Message ID | 20240521175854.96038-10-ryncsn@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 3FF57C25B74 for <linux-mm@archiver.kernel.org>; Tue, 21 May 2024 17:59:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CF6AB6B00A0; Tue, 21 May 2024 13:59:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CA6A56B00A1; Tue, 21 May 2024 13:59:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B22D16B00A2; Tue, 21 May 2024 13:59:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 92AA46B00A0 for <linux-mm@kvack.org>; Tue, 21 May 2024 13:59:46 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 33018161170 for <linux-mm@kvack.org>; Tue, 21 May 2024 17:59:46 +0000 (UTC) X-FDA: 82143165972.06.D330875 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by imf30.hostedemail.com (Postfix) with ESMTP id 5919780008 for <linux-mm@kvack.org>; Tue, 21 May 2024 17:59:44 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=EafNYapJ; spf=pass (imf30.hostedemail.com: domain of ryncsn@gmail.com designates 209.85.214.178 as permitted sender) smtp.mailfrom=ryncsn@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1716314384; a=rsa-sha256; cv=none; b=zGjxj1m7T0OOy2PBXXpa9gKl4rK/TIa+DDlb5gxwF2KzLJyBHlr7DRypK5Q+kHehB6Sslx NsmT8vLSSTWhhcw4izXfy52aYoo4E+fAkEQnymkEzO0G2swckUaSgMQYLdBHvV22d9ScNV usCpDu6obOk6K7tNGNOVE2S03QsrmyA= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=EafNYapJ; spf=pass (imf30.hostedemail.com: domain of ryncsn@gmail.com designates 209.85.214.178 as permitted sender) smtp.mailfrom=ryncsn@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1716314384; h=from:from:sender:reply-to: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=PHrzc7CPuMjcf8HiikXMyTuP6q46A9jLQj3ikc6Mh0Q=; b=VEdf41CY0YZLJYBkzAPNPhLX4Lewzn/q+HVsFLsKR6F3CvLIKT6Hde6GhIgoj4Ceb9wOga Kdf/+pFt2nq5KVogRrKXeHFQiAFH7mWTqIRJcj2DvAZUAqdkFi73fOL5M5g/n6QToZPUGr P5v0en0QwYAlu3oKV9wBDc53ZWeXxk0= Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1f2ecea41deso100450445ad.1 for <linux-mm@kvack.org>; Tue, 21 May 2024 10:59:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716314383; x=1716919183; darn=kvack.org; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=PHrzc7CPuMjcf8HiikXMyTuP6q46A9jLQj3ikc6Mh0Q=; b=EafNYapJRX64vrCeixjGag85M3Um4goSqppuWL6AUnhFNx9DefmUXBUxrrylSBm3jm NKjWweg1EqujUX0F7HkRBo1FbosjAerqdUbERYU4vQbZAFFqH1HYpRaaLF6WFfak2hDB LG3RHqmxKQE2HUxZFW+EOk0kdsPng2VtdY0kRAsh3PwG8b8Uu7t+d7ebwC24FnGFWB+8 RBSIYvBZ/tEdtDsy0zaGfxe0zao9ZKN1Mti8U6wY/kRqdkl+i8Yc1a5k9SwwMzyB/MQR HubfXqXavhlNNIH/uQRQIyBpEMWzhREuEjPxaX5X/vfvhxy0Ug5FzRavUS/tp2niYiFr laag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716314383; x=1716919183; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=PHrzc7CPuMjcf8HiikXMyTuP6q46A9jLQj3ikc6Mh0Q=; b=UrUxOQccjxvr5nH+vPGct5R6U1XITTw6DnMURikzZAZShHFRSigIG84JDvyhy76a6/ l35I8CnvXHVrT1BlK1K6UlAo0OxRn+Opy7uyvwx16hpTjoJzHARIAWu+kueCM3DjO2JS VRLPnKQuqga/hffqkvR50W3cDKNh9HuXDzpWARxvHHW3702L/NSm6+JsV86JpIx5tQCo OAXSJH2Ez2mjkUaPszxFTA25aFLsGSykSyKkGRRmocw4GwuGDbv4T0vMBvkwHC2PH4xd ybX/mtZ4LLQ9+8WJ6V4c/DaQjt3dIm3g3PjyyVZurghXaYEzty6D9lp2FpmLoVgZU3kz sMLg== X-Gm-Message-State: AOJu0YxTOO90v8SQV358LT+U9VkVSvvCDtx/9AbTKFkBC8pl8lsuEohx 7F5bFNioE9mKabiK38tW64cHOI4LAP03HvqfRHLEdXsowHmqKg6MZcJM8jYUgqA= X-Google-Smtp-Source: AGHT+IEqeNhAh7ppNHI9aB2X1JvWm56eouCLIcYDXiomK1yXxCwOtcxJysWQ/3ie5h+P2MMqSoR/GA== X-Received: by 2002:a17:903:2287:b0:1f2:f512:7a5f with SMTP id d9443c01a7336-1f2f5127d48mr99268225ad.42.1716314382853; Tue, 21 May 2024 10:59:42 -0700 (PDT) Received: from localhost.localdomain ([101.32.222.185]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f2fcdf87besm44646935ad.105.2024.05.21.10.59.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 21 May 2024 10:59:42 -0700 (PDT) From: Kairui Song <ryncsn@gmail.com> To: linux-mm@kvack.org Cc: Andrew Morton <akpm@linux-foundation.org>, "Huang, Ying" <ying.huang@intel.com>, Matthew Wilcox <willy@infradead.org>, Chris Li <chrisl@kernel.org>, Barry Song <v-songbaohua@oppo.com>, Ryan Roberts <ryan.roberts@arm.com>, Neil Brown <neilb@suse.de>, Minchan Kim <minchan@kernel.org>, David Hildenbrand <david@redhat.com>, Hugh Dickins <hughd@google.com>, Yosry Ahmed <yosryahmed@google.com>, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Kairui Song <kasong@tencent.com> Subject: [PATCH v6 09/11] mm: remove page_file_offset and folio_file_pos Date: Wed, 22 May 2024 01:58:51 +0800 Message-ID: <20240521175854.96038-10-ryncsn@gmail.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240521175854.96038-1-ryncsn@gmail.com> References: <20240521175854.96038-1-ryncsn@gmail.com> Reply-To: Kairui Song <kasong@tencent.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5919780008 X-Rspam-User: X-Rspamd-Server: rspam12 X-Stat-Signature: x6rxu13mjutfrferyk8ttk9mm1aa4c46 X-HE-Tag: 1716314384-726407 X-HE-Meta: U2FsdGVkX1+va7sr87ETRHmqP32wG5LnfH4lvZJg493VD4IMaWFF2BZt1bAEUGpISLq2H0Ol+oV1vQ5MTdQu9INVyZxldob6bOKSyX8DO0X/tf/xyz6KjAzaOqmA0ZAQnK9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ujhY+ReEDVC5BbmDe1BVaK7+FVcXp/pUs5MOpLMFsi0W0MykakLMjyJ4YkfbkIrnxKqmbZk71ZcNegSuFEnpyVhu04EebtMlPPcgSwurLlkfNXnDQXhiqgU3fRYAdz7LnxQSmqmOwvECaKXm1Ee9+pVk68syZJP9mhO1z+qzm0GTg6QKwa65MX5omtWcgArGwsgKPKmissBxeVaPfpyTi5H4hoBmNrB2YOD+/dWey5F2wSQEQNwyPZ3I12Eh6dRKo6kWHssiSDrK/kkGSNX6i93rgGTELTcnqCuKzQlx2t8bzsT5xFWp1IfUCGP/WQFCOPmAFdaGMwOsdjRv434yfkIw4hHcYlJNQEg9q4TvwvfmcsCviX9WKjf1TIThZZilo/+4ckb1AIHJmdmFbNSfNkmtD4Q0VXZ3o+/LvhZRukyxN0c5DJWHrRABAJ7MtFj2QSy8EI68DDrFV2t3kZYt9aqwYJMfXYIwor/xDOFu3eXvFODq3sp5eYpwWpgo8mcSY6vCHdsJjMytux1RA/K6cGijUFwkT5O1Htq5+lVs= 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm/swap: clean up and optimize swap cache index
|
expand
|
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 3d69589c00a4..010ce7340244 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -920,11 +920,6 @@ static inline loff_t page_offset(struct page *page) return ((loff_t)page->index) << PAGE_SHIFT; } -static inline loff_t page_file_offset(struct page *page) -{ - return ((loff_t)page_index(page)) << PAGE_SHIFT; -} - /** * folio_pos - Returns the byte position of this folio in its file. * @folio: The folio. @@ -934,18 +929,6 @@ static inline loff_t folio_pos(struct folio *folio) return page_offset(&folio->page); } -/** - * folio_file_pos - Returns the byte position of this folio in its file. - * @folio: The folio. - * - * This differs from folio_pos() for folios which belong to a swap file. - * NFS is the only filesystem today which needs to use folio_file_pos(). - */ -static inline loff_t folio_file_pos(struct folio *folio) -{ - return page_file_offset(&folio->page); -} - /* * Get the offset in PAGE_SIZE (even for hugetlb folios). */