From patchwork Wed Apr 17 16:08:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kairui Song X-Patchwork-Id: 13633566 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 D625EC001CC for ; Wed, 17 Apr 2024 16:09:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 661276B008A; Wed, 17 Apr 2024 12:09:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 610F16B0092; Wed, 17 Apr 2024 12:09:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 48C516B0093; Wed, 17 Apr 2024 12:09:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 253A96B008A for ; Wed, 17 Apr 2024 12:09:50 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id E5CAA80F26 for ; Wed, 17 Apr 2024 16:09:49 +0000 (UTC) X-FDA: 82019509698.11.2A0506C Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by imf11.hostedemail.com (Postfix) with ESMTP id 468F44001F for ; Wed, 17 Apr 2024 16:09:48 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=D8VsMktF; spf=pass (imf11.hostedemail.com: domain of ryncsn@gmail.com designates 209.85.210.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=1713370188; a=rsa-sha256; cv=none; b=teXhwVr3ZWEXLjDHv42HD7p7Gotz/dnpe7QTPhnXeIO85B0wVTk9CQXqeZOew1wshJ9cE/ TurY3MPIsEVAWIRJA1GyKzrVE9JrRcoR7NatccpWccVtI7RGxUDI6axPMneu7BTwOlHJnM w94CiVKRDp+5kxP5yhGxZza70K5lEAk= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=D8VsMktF; spf=pass (imf11.hostedemail.com: domain of ryncsn@gmail.com designates 209.85.210.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=1713370188; 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=EKBCpzMJJOybw3E+mN0Qu57krGqjseTa24mZvlKHSk4=; b=PxG2YxMCKNY2vTtQxWEbVzKSlBw5BIWvF3d2jKr7oez3SXls1WynBIYGCAiFN/2Y+sHOpG ABbEQD6QH6r+9TIoPmwIcn4DKi7ZPoTYas++8fdY2K0WTHBoMfyvgvfgm6Q9wNMqX7+4ja ZiVwk3NlgJGXs7TGxVhu5tc/aIq7SYk= Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6ed9fc77bbfso4517522b3a.1 for ; Wed, 17 Apr 2024 09:09:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713370187; x=1713974987; 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=EKBCpzMJJOybw3E+mN0Qu57krGqjseTa24mZvlKHSk4=; b=D8VsMktFQ4XClAvrNmAwmlZGc8kRUhVthpUu0Fc2ckXaCH+ZHJ6HcVfRADP4wtOTkF +Phz5Wv1FPUDpjVQKTzfSRxpE2R+9PTVqqn4tF8K3CUFt+21F3POnMiRMNWB4I1mqqCG HVasy8hQrCJtB9AeQ0srMPMNGMKy1OHdhd10JFd/5lUsmpbvkRUGSgbBfVn3hPxSOaQl gq4x4DpSleqapOy7MYzgmIDAu+rQ8a2FQRtHBjhHVQ5G4J4klYoCk7sS5uMW/JTCU84m dSCHQeBMVmZS2kQK7RiYmtSEiTPZQ/hWbLJnX8sdCesi8RLwHJWnp4mlIWU1MQcYbWln 7GKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713370187; x=1713974987; 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=EKBCpzMJJOybw3E+mN0Qu57krGqjseTa24mZvlKHSk4=; b=jXTZU0Mhsy/140zyv+atGG42V0WVMab8q1U6TAZ0pW2+Y2UPlEPrvJCfeNH6q4UWM/ q4L6iETpZkI/bD1VPihavmDcfxlLcaha4NVIrVUl9g5+kCZEvTY99q/PrLsL4uZI5DHN AG5FnN8r3pEkO4C7o9AhhDDVQ2Qdg0zSl+UUlo5xhdosq/2JSfaVORe5Uh3twcgsmWR5 l3KivG5y8yvkwBjU1D5gedLjU0p+5ozDyXvUJq797UExrf+lAvk1racsgq0I/C4KmQ+8 xBdxz4fbAD8lL/TktKPi6yKkvwcSTDupETp2M9YigcquiSp1p8Zvp9sZI4Nk/EjmNstC U/TA== X-Gm-Message-State: AOJu0YwA7/+PEM6+FboK4iJm9Ik9/lclorWxOCMTGUe+7SLEb5Dl2oNa FPBfrnxux8W8nx/uhd8sU9+Fs3LAIe2lslRm5z0f9cicF5dVmmM0ajbNRTIE0IRKZw== X-Google-Smtp-Source: AGHT+IEUIsD2UfwALUBzZ9zgNwZkhBtp79KdHPB59HWhpiWeEDWZ5TAduyfuawXCnxiRfUFyeMAZ7g== X-Received: by 2002:a05:6a20:1042:b0:1a7:a21b:66f9 with SMTP id gt2-20020a056a20104200b001a7a21b66f9mr48906pzc.43.1713370186696; Wed, 17 Apr 2024 09:09:46 -0700 (PDT) Received: from KASONG-MB2.tencent.com ([115.171.40.106]) by smtp.gmail.com with ESMTPSA id h189-20020a6383c6000000b005f75cf4db92sm5708366pge.82.2024.04.17.09.09.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 17 Apr 2024 09:09:46 -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 2/8] nilfs2: drop usage of page_index Date: Thu, 18 Apr 2024 00:08:36 +0800 Message-ID: <20240417160842.76665-3-ryncsn@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240417160842.76665-1-ryncsn@gmail.com> References: <20240417160842.76665-1-ryncsn@gmail.com> Reply-To: Kairui Song MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 468F44001F X-Stat-Signature: 93doose1akkmtqjarxyh54ym4emmmdd8 X-Rspam-User: X-HE-Tag: 1713370188-183332 X-HE-Meta: U2FsdGVkX1++uZ9Nk+pmO1wSQPNUHUVE504KwZlLm4z4FFTM5trrOPPw/SsjdRtzhlSdE3s13KCNddlSn2hGtlroUmdum4HgDNOVP4A2XLfeYpZPvFANy21IQGzNVz+x0fG/WoBjbaAEj99fyVuFHMKFZw7ZyLOQqxCm+Vo87k83UWVjbB8eWy+6+OiWrECh/+vd7IinOriObn/W9E2aDxdhN44NyQIgE/4q3dhmFWS2D0L0OgvuS1x6VJAscP98hyDpjxbd+JIYxr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bWg2MWvxesDmkZurKoLhdKk0C 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: 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. 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..4594a4459862 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_page->index << (PAGE_SHIFT - bmap->b_inode->i_blkbits); for (pbh = page_buffers(bh->b_page); pbh != bh; pbh = pbh->b_this_page) key++;