Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1567790lqa; Mon, 29 Apr 2024 12:07:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW6DtiszpWaasnUv1GuFHjdwVMBrX21394Qf90StARhGg7zF/z2abQbXpLsPGLkS4abk9YA7pHdatVoHzTHkNi/9kaKUFPYfMYCfgakaw== X-Google-Smtp-Source: AGHT+IFf1zle9fXS9hxgRVbE0ulETk178sJN9YK2340iF5Lu6JKoglEGrREAHWPssYm6DbaU3bMk X-Received: by 2002:a50:951c:0:b0:572:78df:c5f4 with SMTP id u28-20020a50951c000000b0057278dfc5f4mr5809760eda.11.1714417636051; Mon, 29 Apr 2024 12:07:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714417636; cv=pass; d=google.com; s=arc-20160816; b=FnAQFYgRIVweqwgOYuZSJTVZI5FwvWb/nzbs5zy3lumDIoxfXahYhzrK854dt6lwD1 8rTs3BYcdZXNszqYdC31AYHFs1F1EUyZTx1DO/tx4xn7dS3j5hieNcGlx/zWHyDWeBHq pQAr3u9Z8SYvntLSccxHbarxRbbxYSl6bXIkHb0Oq5STrZQEmS6RW5H7ghN3IELL/2DU S1IyzC/UBvGEOv9o6sWyKpMQP4SBFbI0bQTYvYcB5Kcm85MRJMIeyhdgSGcebXxoNp4V WPq5UQ39Z2g9HnkJhJ5iDdSIEMEhbyzVXshjzDOHQuXC9tQ8bCRgqMrvMi0JdoP33q/e ai4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:reply-to:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=WSvD/YVvY3oR/SV9lrJcxmGa9WfASg1z+eMVQdwymCU=; fh=LYqDmEab7wzebUpbCzh/mTMUxW8HG0aHWOwsrT4SoZM=; b=VekXBw6hIkpotjr5VdSrDP8mqVs8tlAJcpj72V2C7U+uQF7f+nmN4oq9Hl4FV/j67H 04dM2SVyGsoUxjyl/G2SI/M4juw1dOrjiAC2YghYA0tAhQbsYsVNMGvAau0c7ZYOVgfD AI02hBrQ5+hcexwRVeOdgvSOL3mz6QEnjKuDyJv1o4H3P1ODkrKmh/ZaYEmtrgTeU18H COdJho9W4flkaHrF4hV97//W7N8rDNB6NvL2tTBlF849rl1ygVS3C3kbXYTCUhDEio/k Cw3xAN0HcQC/qnKX37UdOGYAEaxdZ3XhcZAknJZW6oEZmQcyAk/RQ6+MxEKa4X+cArPF /Asw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=aXZIHhLr; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-162878-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162878-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id n13-20020a056402060d00b005701746f37dsi14438271edv.645.2024.04.29.12.07.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 12:07:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162878-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=aXZIHhLr; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-162878-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162878-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C29881F21AE3 for ; Mon, 29 Apr 2024 19:07:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 34DA013B790; Mon, 29 Apr 2024 19:06:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aXZIHhLr" Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B56E13B292; Mon, 29 Apr 2024 19:06:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714417613; cv=none; b=Q82980/6epVuwscASfxjnpkm2OMjs+1AYy4y15Cwz3pmlDSzdmbepRIzVaLUH0Hvo5dNz7NpEV9jPw9mIgbyeCv7rV651o4NQT4evoJZGctzrbU/yCewDMEiH4VoonVAJqnCHoaITP98qMue99gVlB7PUhNLTJlJ9nYAIZk3RIA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714417613; c=relaxed/simple; bh=hDlPxTRmPzQHkSl/lYkJK+GDIbLDQq8I/dn2VuGCZ+Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lghgKr5FMYBqjIovdlWnysxFc8QeOE67RjdVgIHfJJIV3Gp2MD3RkaBbh9Za6sr8zdPyHGF7BTNqPEatiLV5e+xDwnlDLaT1pq0OLx1W5cv8dJVJdy64N5kbXjugIGPDDLUNV2PH0X2SJoOb4MPc0ygTOuPPSgkVKDP1mAHxTio= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=aXZIHhLr; arc=none smtp.client-ip=209.85.214.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1eab16c8d83so38643555ad.3; Mon, 29 Apr 2024 12:06:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714417611; x=1715022411; darn=vger.kernel.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=WSvD/YVvY3oR/SV9lrJcxmGa9WfASg1z+eMVQdwymCU=; b=aXZIHhLrZeNyFWhKGu/8Mw804jf9yqvaXYPvKV7DwUfDeCsQe7GJWrbKK1JbsKi6ds ePz9vhvNr2Q+Q5jgKrjlOPyEXM6uSECUfIbYteeWbM9E6eu1XuU6S9QMAp2ypF4SHFun UbfvgO3EBtNgy8/UdXGhoGA6GtiBA+TgesXCqwlCXNuFT1yeKsaGwGAGIFOXhgWyQXo0 g/tOcxstKUVTYKIeceAfI7V7BNbBstfoLkHDP9mULKG3vKdmfVrBN9m7Hm2tJa9osM5w 6y8WAcY62czY7C/VqfYUndSCLlhZfIIZzUsQgE5o7gwR0z4ktMPUBasarXMUQnFoV0Hh gWVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714417611; x=1715022411; 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=WSvD/YVvY3oR/SV9lrJcxmGa9WfASg1z+eMVQdwymCU=; b=NJwoYoRjqTjXkkzYE0NbKmF+K58Z3wXG+DUo25atu6GbMWTjFs4rs+9UmWkym3r14i kHs6RygAstL03m8EShW+fiQINaH/Nt9XoM+vs4rYt0DsVsgRsLkcpZcDrXJiDEL4SinE 7gDs1comHV0QPe6yjGG3hcMGkBW6toYC107b2vMqHE5U6RFS97pLK3WqhBFoi42uTvXo M3aQMOgh4r03hhBpSpbz7nADK5s6d0EVrFgan672YDI73OdGHLYGdN+9DiNezDCX2F2v f/lh7p5PoucS49dMWPKCK+bRjBn4zWH/exqy9nbyJUQgpZ34+6qkbF3uHYg6z83VQ1kl SpFA== X-Forwarded-Encrypted: i=1; AJvYcCUkXNr0WfkrGDd/iPlzf96SmPOY+yZ7QRpRj7W2/vuO6Yex6lFFSTrZjpYVaMrwycJA2XVVQbQm/7yYWo47FKmKs4vgNQEsq88dxSSDgpusLg3N8EAJiZycUgyiRDc+NCzl5n7URUC/mM7xVA== X-Gm-Message-State: AOJu0YyKojKu1ucJnoOOJM5bjTkQHvSJ+TloikBPRqQqqnE9l4R17RLq jjggpa+oRaPZVN70rYqHKg5+GJCagiNNrHaT72lCUU3Y9VfbAhD5 X-Received: by 2002:a17:903:1249:b0:1e4:b1eb:7dee with SMTP id u9-20020a170903124900b001e4b1eb7deemr13466540plh.47.1714417611389; Mon, 29 Apr 2024 12:06:51 -0700 (PDT) Received: from KASONG-MB2.tencent.com ([1.203.116.31]) by smtp.gmail.com with ESMTPSA id y4-20020a170902864400b001e49428f313sm20619356plt.261.2024.04.29.12.06.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Apr 2024 12:06:51 -0700 (PDT) From: Kairui Song To: linux-mm@kvack.org Cc: Andrew Morton , "Huang, Ying" , Matthew Wilcox , Chris Li , Barry Song , Ryan Roberts , Neil Brown , Minchan Kim , Hugh Dickins , David Hildenbrand , Yosry Ahmed , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Kairui Song , Chao Yu , Jaegeuk Kim , linux-f2fs-devel@lists.sourceforge.net Subject: [PATCH v3 01/12] f2fs: drop usage of page_index Date: Tue, 30 Apr 2024 03:04:49 +0800 Message-ID: <20240429190500.30979-2-ryncsn@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240429190500.30979-1-ryncsn@gmail.com> References: <20240429190500.30979-1-ryncsn@gmail.com> Reply-To: Kairui Song Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Kairui Song page_index is needed for mixed usage of page cache and swap cache, for pure page cache usage, the caller can just use page->index instead. It can't be a swap cache page here, so just drop it. [ This commit will not be needed once f2fs converted f2fs_mpage_readpages() to use folio] Signed-off-by: Kairui Song Cc: Chao Yu Cc: Jaegeuk Kim Cc: linux-f2fs-devel@lists.sourceforge.net --- fs/f2fs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 961e6ff77c72..c0e1459702e6 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -2057,7 +2057,7 @@ static int f2fs_read_single_page(struct inode *inode, struct page *page, sector_t block_nr; int ret = 0; - block_in_file = (sector_t)page_index(page); + block_in_file = (sector_t)page->index; last_block = block_in_file + nr_pages; last_block_in_file = bytes_to_blks(inode, f2fs_readpage_limit(inode) + blocksize - 1); -- 2.44.0