Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp3105276lqt; Tue, 23 Apr 2024 10:22:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUUc29x1T/bCb3P+Rsb0Xv3BAjh8HXu7G+wZgSna7nnFUrFvDqCcYVLqEul+SKD/79loQxQ3S/QUKtATIL//TliuLNb2k7y0mb8cxPvIg== X-Google-Smtp-Source: AGHT+IFg3JWlAj24+vqJ0qN39SRhXMowg7V7YdhzFS9kTPXEow+9cq4QXFS8Xi4wXJoShWX6PZUI X-Received: by 2002:a17:902:eac4:b0:1e0:e8b5:3225 with SMTP id p4-20020a170902eac400b001e0e8b53225mr148369pld.12.1713892934385; Tue, 23 Apr 2024 10:22:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713892934; cv=pass; d=google.com; s=arc-20160816; b=LEjLjMl7SF6r3ljMShemS+vhWtcDxipdQzCXgW3A0I/bO0BD7HUZ6E2Vgn79VI9wuW QciDHn0NMwY+g25b9eV5NIQXdF40OSmq1Y6B1ChInO08suOdgsRwLh+yDuI8Es+3uzEl Qukfdl/pZb39FjmztSMHnRUZxkXndCgS8sSp/BnBMIpxgLhQgOnwqgftxpwR6Lzjx6KU /ll0LA+ZKVOHas7jzcBAinkagqNXUb20sPb7mf7hz5jWSNPZOKODiTjwlfGslqwYoFfN O72W82r7kmTC8P6WtBOV4oRO6tvO+boIryP3xhZIcTMCYTMcYX74nLsdVpDxPc4DKt4H kmWA== 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=YfpxwnN8CfoAe7aR3YgTjEdl37ZW9GmobE0CddHnTJA=; fh=i/VQDjwXi/AcQIhOqyrilcHK7U+L3S0o+ls52Vt82DU=; b=pnS7rNLLAfVR7X/WGYz39OpssWYl7RG9iTUbQx3DjbwZacCrLuavLUNMmPLJEMNsUi jWvi1HHHNH0cjX+HCjr/W7gMW2vMhhn1FOJj1dqt5ath13MDnoT+/gVc0QjTxz25KfV7 aLXqruJZIE+i11jnnR7hQ1qzDVBKUkt2BmWHusPzwwg2bsg/vQBsbZg1/BRr6hl/qJ7+ A87STI/weFJftvOaUpayv06WmS3w9Bm7jGS6amx/RLeJG88+cXE8p8d0wJMteZ7yrMUx V8QLH5meB4mGbOXVTleWBvsDYw4i6Y/zWPwahUwgjuD47gHFjcL2f7RPv+tUo6UZGwpW 8lNw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=OCFP2ODN; 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-155620-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155620-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id p15-20020a170902780f00b001e0c121791asi9520393pll.540.2024.04.23.10.22.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 10:22:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155620-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=OCFP2ODN; 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-155620-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155620-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 0C0B2B258A4 for ; Tue, 23 Apr 2024 17:04:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9B2D213E408; Tue, 23 Apr 2024 17:04:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OCFP2ODN" Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.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 8825F13E057; Tue, 23 Apr 2024 17:04:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713891841; cv=none; b=PXGqUV3dEX3GEkvSAFNKI25HcpvEU2LN1C7Zy0G00kl0aU0bIXtQBIinZnk3KDWAI/gzc5ixV2Af8wJXTSNNswz3xMFPsJf4xj/ep6OMK055VAZQD6otvLh7kqjXMx4W0aY/nDEl/qVMDtE0rcQI2NIFPgUPd+3sW81h+ODyX1s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713891841; c=relaxed/simple; bh=Uyce+dc3t6E+2F7Kun0sqcdJkKyU2ngW6vMHcIsFCvQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Tct6ryTyJMpb4orilm0cwG47EVe8FeE896aBKpVn1NOpt+ppLUbPG2q/wiyFg25obXXjXaDheS3QYSm9G4XoUfP+eOksxU64Fc6sM64WXK/iY90d01whzwJCxRMbMaCGBDs14jauUhKm5VZv09K2IZCWohY0iqmNYmpaHXkZUOw= 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=OCFP2ODN; arc=none smtp.client-ip=209.85.210.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-pf1-f182.google.com with SMTP id d2e1a72fcca58-6ee0642f718so56017b3a.0; Tue, 23 Apr 2024 10:04:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713891840; x=1714496640; 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=YfpxwnN8CfoAe7aR3YgTjEdl37ZW9GmobE0CddHnTJA=; b=OCFP2ODN36AyfHCRosaPabwYhrhVdgjZi9lQb/qWno2ZbQ5JXjGHPEA1UQPTHNcvcN A62jdVQCEk7JA+LyZlLwLpU3ZVc4apy0WJcBTquV5seDzcgUjcQ/K/M/rwMfXGuypfP9 9nv04vQZ2lEN+95Bg05sBOk7lakWcdEiCnHN0t+jOP1b36kpetnd59MqCHJw4Tdqd/kx gPdKrlIZZ7Ex33o0dvO5DHd/a3AGO1ZNUJDdIZFvED2q7nwP0kPdhrsK5kujSTizZYry x6jNG0WNyF+1pS9c3/nCVjHWbsazdk1z2FurhTSyH0gNjnV7YUpTD0T1mPYzBp5SJnn6 6soA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713891840; x=1714496640; 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=YfpxwnN8CfoAe7aR3YgTjEdl37ZW9GmobE0CddHnTJA=; b=XkxUIRUFIEaxaaeP1EcGeGS3CndOUGCLV/wOJQceuIZX+Y/+LH8Z6mXEWqa+gmh45P mYDnPa27ymTlsNzwy/odx9oN49KKbY76oayI8NBSsUZVlXXNgAANuLIpa7d6mHu9/FRm mowF9WkHQ/eLhuYHJSHvItRuQlWVQe/F32l7g9/u+JmILLLyMlkhhuYjAhLmueQyHTkL IumMukUu4eOB5A5SjQQcxon3DQFBge3FGLPgqshKaGFdns5RJRtZkxWKc+PuWPjIcsZm B++gMO/w3Tl3mZKcvkxP+oA/zoqFme5gHUAzqCSJyeglwh++oH9bsIiPy2gJKsUQNuSB +atw== X-Forwarded-Encrypted: i=1; AJvYcCVesD5poqBCes0urYixToMHi8rQz8xfgYu7txzyjNAZsFY0EfTdxlmiBdevULHgQuAkxqTDB1O0Fv+fiITUIq6Lm8jQTNERtxBkoURxV6tjGoKkKOjWYsl/GvROSATHcSaqjujrq+QIOkqn5Q/3QcZOBHGSohXHoAek4ZejCzYRHXqMnC3e6OK6 X-Gm-Message-State: AOJu0YzIUajgjT1oDe/EPC+E3iRLmnW3OEJ6oDYh5JFfGfblu1bhhfPD VbgUutACNUb+o+K0hVm8H50T5EfNz8YXxKDzaa1Tz3cLlVOO61Tq X-Received: by 2002:a17:90b:815:b0:2a7:8674:a0c8 with SMTP id bk21-20020a17090b081500b002a78674a0c8mr4130992pjb.1.1713891839853; Tue, 23 Apr 2024 10:03:59 -0700 (PDT) Received: from KASONG-MB2.tencent.com ([1.203.116.31]) by smtp.gmail.com with ESMTPSA id s19-20020a17090a881300b002a5d684a6a7sm9641148pjn.10.2024.04.23.10.03.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 Apr 2024 10:03:59 -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 , Ryusuke Konishi , linux-nilfs@vger.kernel.org Subject: [PATCH v2 2/8] nilfs2: drop usage of page_index Date: Wed, 24 Apr 2024 01:03:33 +0800 Message-ID: <20240423170339.54131-3-ryncsn@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240423170339.54131-1-ryncsn@gmail.com> References: <20240423170339.54131-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 only 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 (being part of buffer head), so just drop it, also convert it to use folio. Signed-off-by: Kairui Song Cc: Ryusuke Konishi Cc: linux-nilfs@vger.kernel.org --- fs/nilfs2/bmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/nilfs2/bmap.c b/fs/nilfs2/bmap.c index 383f0afa2cea..9f561afe864f 100644 --- a/fs/nilfs2/bmap.c +++ b/fs/nilfs2/bmap.c @@ -453,8 +453,7 @@ __u64 nilfs_bmap_data_get_key(const struct nilfs_bmap *bmap, struct buffer_head *pbh; __u64 key; - key = page_index(bh->b_page) << (PAGE_SHIFT - - bmap->b_inode->i_blkbits); + key = bh->b_folio->index << (PAGE_SHIFT - bmap->b_inode->i_blkbits); for (pbh = page_buffers(bh->b_page); pbh != bh; pbh = pbh->b_this_page) key++; -- 2.44.0