Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp438077lqo; Fri, 10 May 2024 04:51:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV3aw/0XoMV/tgpFf00TvE9fPfvOVBDqb5IHLTj4UORMXseNqnJhvu6U1TX6JaPkuHfJPYgnwq9ODrq9Hr/IW2olEwmsr5WjNtPmb9gMg== X-Google-Smtp-Source: AGHT+IEbct1x9qrNmwkYh075s0MX4i+PYgw+Ke0Hquggb3k1P8pxaAAO7nSxcC19Q2oFn+fbQIB9 X-Received: by 2002:a05:6512:2252:b0:51b:4d45:28f0 with SMTP id 2adb3069b0e04-5221016b497mr3432026e87.43.1715341870883; Fri, 10 May 2024 04:51:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715341870; cv=pass; d=google.com; s=arc-20160816; b=HL9Epzm22kyipXiYkFqD078dKcvf2Fv2bPY5HeYKvnz8CVoh0kezEVv+lcpzg90r1i pUSlvyzOsUvzAChFLw/SIS0ena2iaQ+egiEox8EcXmoGOwrnI2NcIU/5OSORXmiQI47D hGGuX5DTs5NfJfRlJWxQE6KUf7DsPQRrC6Crqx7ZysFbnwsrWka+NXsvE1/bg9o3D1PC Q5XhYOezFAoYiQWHcsAKUzlrFBXZU7nOGL6/fVvmSwQlwN/k4PGExVdXl4Zzf9xJk1xI sdCcqscoZZhujiP3m80g7auyIcYVBwyQJwgAoQjfeylVVlccXHba/KN1Veh7MO6Lcxn7 MrQA== 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=T/Y01wUoc8GqRpvXAplln3XTaKFYbBI0hlcfHL66MPg=; fh=sgsrnHu/o8/tOQbp8ejVn2mWck4U9HWovcCrwP8XUJI=; b=ewMJENNVrBhEiNH/uIY241UqwGeCFLTeU9JGpYJhtvPmufB7FxksVP3o/jfnCX7AvA DWTGEaMULmAvQuZtOIGuem4s77Y2jJnb95bs9uuWW6BLqIOhssw8bVapfI83mKWpMNE7 IJ/gYeGxfMMtYGODk6JZkwiitkow7NiaclKJ6yYf6p8JbFBw2OqkT9iej6WKh+lwu1kI eEP0ZHSCKYp+HgbzlOJy4l4f6e7ZiHjlHaZVRmETOEsoLaJluZeB+4E6mTHOslOu2UWb 8V3IIR6gc+LKWSy3g8R7gCAEjnpwvRNwiq4P6sqWjaDdQvUsFn1FpRQD2Fu5+iF0c9U0 lfig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Z7JmxddO; 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-nfs+bounces-3231-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3231-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17c2c659si196501966b.1028.2024.05.10.04.51.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 04:51:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3231-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Z7JmxddO; 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-nfs+bounces-3231-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3231-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 9964E1F22B31 for ; Fri, 10 May 2024 11:51:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B799916F0D6; Fri, 10 May 2024 11:50:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Z7JmxddO" X-Original-To: linux-nfs@vger.kernel.org Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (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 4C8E91708A8; Fri, 10 May 2024 11:50:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715341809; cv=none; b=SPkt4YBjgCChitNX5Y7ocKIwCz7MIW2+evrweN7OdbOdEqj3ZxyjxEBtSvWbe0H1vOQ/oBrwK+8KZ8Fi+9kEKzjw+sPZXV1ToWIC7Zw8fHFfW0gG2CQ6uIJLCZoa9aIFWGFKXjW7/rAFfXUUZW+81ZE5qaFI5nTSL7trcA9ujbk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715341809; c=relaxed/simple; bh=ShAn5fhCYPl8qlhBHZU43ypZj6BFHQvlTb/1BJsqubw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TF/knX2Je4hkThBV+YMCux9npwXbwSaFYdSwRD0f7i7fC/VLXjDWdzL0Sm9rtkJtShpwp+TXDgDoqQ0p0wB4+6MMVXU496k5RkfW/3WCgn2vgoptcoRjw4Ixs7x9K53wTFBBp534TasdqqRLANFOHq8DQNpPGmMqTTQbJkU3bF4= 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=Z7JmxddO; arc=none smtp.client-ip=209.85.214.179 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-f179.google.com with SMTP id d9443c01a7336-1ee5235f5c9so16379115ad.2; Fri, 10 May 2024 04:50:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715341807; x=1715946607; 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=T/Y01wUoc8GqRpvXAplln3XTaKFYbBI0hlcfHL66MPg=; b=Z7JmxddOeFmyIqyuuUHxZWbKUBhPVsXdz7rrc/DQO+hWvucrWFEHiiaqMoyIdVkjV/ wE74Y6IrgmWARCErVqGjN6F7jEEnAAqU0yf2j2HVyLpJCnIJ9gB3X9UwIyt0YUSN2nXo XNU2TrBvmchACbrP5XPeQpj483FON6xMVm/Xosuk4HXM2XjpMf3fR5TxSHCvdjNgoqsc Sbbs2lmyy6bZU6PUN85/YwNBoWVuoan1TiuBnMXo1WJqKVZT/sqGEQEQlfAHNTkXlYAA IenA9jUydjU/lo42kqtmXC2Z1zM0Pu4VcJzFYRMPTENlwHCGgPCVbtY7wbSZIcvdup6h WB1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715341807; x=1715946607; 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=T/Y01wUoc8GqRpvXAplln3XTaKFYbBI0hlcfHL66MPg=; b=hT3g/y4hGKP67CRcyt9XaGVPILddiI3SpcTEwKlm88HzlredXd73d0oy5FtXjYLyt3 tdny78vw9ChAcRHefP7au1l2XT2AWfYZi5aq7Eaa1qzD4CDDlC7yTmld5CjakEkM+Qau 44FG3m0aZ7YSVxcf7GJe4TBkBWiksGxMYLr9K2M3K3wTNfMPUnGi4vcDTAsy4cEC+tYh 5ob7FzEPF0EU4ptvIRilNDQNHEiELR/naRRlR+Hka+1yp2OylmnxkgGTJUDiL2xALENz /JH8UHxxK2OHQK28kJCMXSruZ+sxhOyTWSin7t+g1vV7QN6iWgX8Gk6/fBW1JgIs2+Aa 4R2g== X-Forwarded-Encrypted: i=1; AJvYcCVUbaodkwUxyOMDpVdgcQtL59/DkrCCLqa9XKRao1KUIjCL1oVH65xixHf4P2RZYLZj7ZdC0yBd7cU3aSSeJSvutlLa7DqxSv81hzQreKSuSv9KDAHD0pF8WyYQUhT5gO4/u6KAeAQL191vuUzs5lsVmiDge0TD3Eu7ULm9Vbb9CIoE6GRMfA== X-Gm-Message-State: AOJu0YzPJtL+srdFM6SZLsPAbx5mY/FBFnnQ2OFlVjT36hc1H3w4aa99 89MCn5ezKTWw/xRaDvHesmCFZW+e8VHyVkm3bccij56IHHFXJCiT X-Received: by 2002:a17:902:8307:b0:1e7:b7ea:2d61 with SMTP id d9443c01a7336-1ef43e26bc4mr20776495ad.37.1715341807566; Fri, 10 May 2024 04:50:07 -0700 (PDT) Received: from KASONG-MC4.tencent.com ([43.132.141.20]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0c134155sm30183825ad.231.2024.05.10.04.50.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 May 2024 04:50:07 -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 , David Hildenbrand , Hugh Dickins , Yosry Ahmed , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Kairui Song , Trond Myklebust , Anna Schumaker , linux-nfs@vger.kernel.org Subject: [PATCH v5 04/12] NFS: remove nfs_page_lengthg and usage of page_index Date: Fri, 10 May 2024 19:47:39 +0800 Message-ID: <20240510114747.21548-5-ryncsn@gmail.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240510114747.21548-1-ryncsn@gmail.com> References: <20240510114747.21548-1-ryncsn@gmail.com> Reply-To: Kairui Song Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Kairui Song This function is no longer used after commit 4fa7a717b432 ("NFS: Fix up nfs_vm_page_mkwrite() for folios"), all users have been converted to use folio instead, just delete it to remove usage of page_index. Signed-off-by: Kairui Song Cc: Trond Myklebust Cc: Anna Schumaker Cc: linux-nfs@vger.kernel.org --- fs/nfs/internal.h | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index 06253695fe53..deac98dce6ac 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -790,25 +790,6 @@ static inline void nfs_folio_mark_unstable(struct folio *folio, } } -/* - * Determine the number of bytes of data the page contains - */ -static inline -unsigned int nfs_page_length(struct page *page) -{ - loff_t i_size = i_size_read(page_file_mapping(page)->host); - - if (i_size > 0) { - pgoff_t index = page_index(page); - pgoff_t end_index = (i_size - 1) >> PAGE_SHIFT; - if (index < end_index) - return PAGE_SIZE; - if (index == end_index) - return ((i_size - 1) & ~PAGE_MASK) + 1; - } - return 0; -} - /* * Determine the number of bytes of data the page contains */ -- 2.45.0