From patchwork Mon Apr 29 19:04:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kairui Song X-Patchwork-Id: 13647544 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 4080AC4345F for ; Mon, 29 Apr 2024 19:07:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C315A6B0095; Mon, 29 Apr 2024 15:07:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BE1096B0096; Mon, 29 Apr 2024 15:07:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A82156B0098; Mon, 29 Apr 2024 15:07:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 881336B0095 for ; Mon, 29 Apr 2024 15:07:09 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 52E8D1A022F for ; Mon, 29 Apr 2024 19:07:09 +0000 (UTC) X-FDA: 82063502178.23.CE333A1 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by imf15.hostedemail.com (Postfix) with ESMTP id 79796A002B for ; Mon, 29 Apr 2024 19:07:06 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ngDmeRTO; spf=pass (imf15.hostedemail.com: domain of ryncsn@gmail.com designates 209.85.214.182 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=1714417626; 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=BixicrujN2w/NN7W8Yk1bOtYDD16jf87ysiCrI+mjZw=; b=MW5Cr6AoCvwlxaVVxPUKfPkbTSxz56R94Y8DRUGuhni40oFh3A8Nvp8AytOZp41gddZEGw obCC1ZGWyOZ6AbPOeVPRy/LeD37uCAJW7eo3sKSrMEpgAHfFM2NppjhOMOmuysCixdTHTg 85ivG745uVl3BgQDKY9lVdqR+xXCGO4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714417626; a=rsa-sha256; cv=none; b=N3+PM/sJ0Ao+4FNn+qs18kKDcZM4+Kd/t3ChwRixSvTmFdzp2hW3DyUjqce4qZZ9cjLpWP +FiYWByUGpbgqv9OXYy9a39+x3lKPYxVaQnLgCkQ/kXdsFuHn8cVKt3ZiLfs6wFrrW3gi3 /UledSWZ3X8CR+Nvg/5B8CC8u8jRsKU= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ngDmeRTO; spf=pass (imf15.hostedemail.com: domain of ryncsn@gmail.com designates 209.85.214.182 as permitted sender) smtp.mailfrom=ryncsn@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1e8bbcbc2b7so43988675ad.0 for ; Mon, 29 Apr 2024 12:07:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714417625; x=1715022425; 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=BixicrujN2w/NN7W8Yk1bOtYDD16jf87ysiCrI+mjZw=; b=ngDmeRTOqTcPd6qG94piYgZcwVhe4leInEczFwzyzQPTActJ4oyCVIyLR/bu3FK1qJ CcoxEgbPjhbeTLm8vOg9aiIjI7SXQS/E0bX2DKyTg99DHBDRdTGYtdfNJHMqI2MFT1I9 6iR1MDEUUujCKkc/0U6LhGw0GBIY/v7fuLNIfrvVFziMTq4jAtNLgumco8vDC9HMTB+8 10MTV45bZM/NiEf9T44+PJWDnOpB1sbPnvIXE8yZ7+6j7rmYD8ObC6Y7yuBFGmxBoEh3 6XPf2pJjLSVYA+jeeNKcyttqEo6Mogn8hEsmBZsCzNMC5zChuLj13oJoXfgIoqRse+YA Ce0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714417625; x=1715022425; 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=BixicrujN2w/NN7W8Yk1bOtYDD16jf87ysiCrI+mjZw=; b=KlAMKkKqhxp6Wrn56XyMWNrmafUcXqoeT59e9yU3HQrntUaiUJcgp3Zci80m7Rq8gB Uli9vsrBrAJ51wGQEGFqU+y3Db+sgzfarSSBCvthlEYRo4mp7Rpco5w2TztrKycLwM6z BUkxV2MHYPvzwG73wcS4A+rRrjFlTYWjlA27QJzFbR/N/O5oQ0qrlTNsSx3Wi66tfs8X Gk09tEuucCjwka1c97KglisVMth5NPzVt9vUeXA6/ojomol43l9gl9puxNECNrTNvDtq YJiBL3Z4jytZFk/OF7dcqdGKwXUye1njA9HwOnThN/pyUD22uTZdn6p5esAFdHPUC6tl hiGw== X-Gm-Message-State: AOJu0YwTlmRGUqneJRK9/k5KnISTdqY5g86DfO43HxZTxx+tjLx8oncg emiE3xHR99LMewy1X2waRGnJHr6mATr+sYK+H8YGPK3ktz5zjUnD1Ri9H6qskP8= X-Google-Smtp-Source: AGHT+IGCpCshl3e+0jgFbNefsapLc8x0wT7Iwt/SLS3EHILX+IdhnoyhK9bIf4QdB7KeidxbJ/QzBA== X-Received: by 2002:a17:902:da8a:b0:1e4:a667:5528 with SMTP id j10-20020a170902da8a00b001e4a6675528mr16722842plx.3.1714417624876; Mon, 29 Apr 2024 12:07:04 -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.07.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Apr 2024 12:07:04 -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 , Trond Myklebust , Anna Schumaker , linux-nfs@vger.kernel.org Subject: [PATCH v3 04/12] NFS: remove nfs_page_lengthg and usage of page_index Date: Tue, 30 Apr 2024 03:04:52 +0800 Message-ID: <20240429190500.30979-5-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 MIME-Version: 1.0 X-Rspam-User: X-Stat-Signature: 959aa45ufjtpas6ycrxbd4rrkqgj147c X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 79796A002B X-HE-Tag: 1714417626-918359 X-HE-Meta: U2FsdGVkX1+pBtTb3T1Yz5n3xZibzZ1ZN/CcSe12RsVM1ktC/OHGxGjWt170MdD9t9UF/Utu76EqeB3wfqL6L3Vjq6xIdQCLOHK2D5xJnSl7iA/Z/9VvTXfMLdtF41GZqVBx38m3unmaB6cyXgcsKrpQMExJy2absiFEA7F8dPnQDVB/5/r5Z9zkQP3/o5Ao91Vezr6w0eyL2Y/uLe6YZ25vcpy5Gt34+Q/qE2KWP57S9uGjktIQcggk3QQIO0+iU7yTS5PiorZRj5riRM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GOxh7BQ102T0C569rsPVEoPk1lc/7d/RjTe6wko6/EgjZFt336LUIfJs3HT3kC4kJb3fM2wgMTdHL3WqB/66VwHQEbzJjmqBoN9h44qAwb4EYF5MrGnt82q86rXlWlqZe11RCTq3YkABfqPBr/9YVKgkgpROCr4UWvsEgNuON2gis6FAL4URMGZ+yTXIEKbwtdUTWDDOgQ6YPgnkl+9Y7m9MkUdqneoG7KgZbVXnYAr3bGZCaSKN7LouHljWMzjN+NOAMDYE3hCIB4vxdHbQFW+Qsk3aTQ9H0m3MbHMBMiS3vSdZEN0I/7Rua8/4ZMBXnG7KM5naFgPpo0Kc7Im5dJVrK/MUINImQ4cQMmdqQROqEG+e0si5EDZDd9Xr3pWuuneY+8S0qS7MxV5EsP3ush5WR1SUPH+BNkH6PlL8USmJOX1r0siofJ/R3sYabNvWx8xYqnuTliZkcQmT54hIfCcBxm/ZopPWWRpgbuboov8m40TvaNVtbtd0+q6E+OuwqRRq0L2EfANQLLKNA== 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 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 */