From patchwork Thu May 2 08:46:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kairui Song X-Patchwork-Id: 13651432 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 50CCDC4345F for ; Thu, 2 May 2024 08:47:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D5EFA6B0095; Thu, 2 May 2024 04:47:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D0F886B0096; Thu, 2 May 2024 04:47:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BD6C46B0098; Thu, 2 May 2024 04:47:39 -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 A067D6B0095 for ; Thu, 2 May 2024 04:47:39 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 536CA120A7E for ; Thu, 2 May 2024 08:47:39 +0000 (UTC) X-FDA: 82072827438.16.80C55A5 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by imf23.hostedemail.com (Postfix) with ESMTP id 84D1114000E for ; Thu, 2 May 2024 08:47:36 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ez6VNN+u; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf23.hostedemail.com: domain of ryncsn@gmail.com designates 209.85.210.176 as permitted sender) smtp.mailfrom=ryncsn@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714639656; 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=7PiwJE9uQmN0uws0CC+HD/WsVJUPjjolITxGR0eGWdQ=; b=RLWZhCw0IeJGVExazLRVc2EZN+jyoMP74pubyiexinUdsTTBlAOUM2b1XSU5O7qy9fijJd +AJPrfTFNDC1foBw0sShrDPhhoAG2cnA0+xiyXPhln9I1r9viOKRNuh6hNc9m414rTIRKS dk+REL/C2x4jqBmYIc/cuk2p9Hjs9w8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714639656; a=rsa-sha256; cv=none; b=ekP9WmZHv8LJiBgiF/FEtzSVbLkMJLhH6H0PUKtpUWw6QbXDBMAQJVmOazNkisdckTx3fR Xz5zL8HrobpbbbY2Ije0rQ4ZwG4He18ikG4ZmPGzp4iJyx0vJhSvEi9S9JpltDLdyXpt4m ufQtG3a7pTJfBpOU2ITNKUJ71IBIxB0= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ez6VNN+u; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf23.hostedemail.com: domain of ryncsn@gmail.com designates 209.85.210.176 as permitted sender) smtp.mailfrom=ryncsn@gmail.com Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-6ecff9df447so7360694b3a.1 for ; Thu, 02 May 2024 01:47:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714639655; x=1715244455; 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=7PiwJE9uQmN0uws0CC+HD/WsVJUPjjolITxGR0eGWdQ=; b=ez6VNN+urMDi1YAZoADpsp8G/eEEqcTKwWKvZpZ78qC8i590ZoU0QcnhvepEipBusA S8bqmd630Mjd+A0NzvBvQABDiwvXZY0N/wR5Za5WtQU63DqXczhWoecRVQE5aRfXodyQ Sllw4usycKPp3/tMK2EWrE6mnXIbfG/VGSnw92fmaAg2eYEKqYF7APOvcbiX13GCOG/F CTioB8Dbitmh/htGU+p/9ZPSi+LdWZOOr4FmZswnktY4pdJUkmTMrxfqlnfz97P+USQq FgHfmZrYuHqpe57olnRYLDfDh23RDx3L6s2+/EXxfbtkxHxh+nqJiS35rorh4/Wg5mkx IBKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714639655; x=1715244455; 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=7PiwJE9uQmN0uws0CC+HD/WsVJUPjjolITxGR0eGWdQ=; b=AD5X7RJehGYrWcq3ElrOUTGIHFjgdXq2JN/agE5p1mWVLFDVpEzqMVOCyNGqAFPbeF KfxyUKTJNSS7gT0/w1eNafZkc05ZyapqUk2RLehEoTTt/LDIe0ORBuAnES9OIADB/kCM x7j1ToO7pn7BBKb+9PfhYflYpZziSx/UkCz5XLdFx5YLoBoyyeoSF49+59e5SQZLE9Ja Tq/BHpbSX3wy38iaBU1+Sgx9wjGa4qfwy17k+nHJGbD/e2DJsG5KGLN9LSW958jrQaJL n5FRmtX9+wFDjCyz+u7NqzQmj778tkjN48juzAQh5wSc+hxl00kgnyAJNms6O7NDlBKR nU3Q== X-Gm-Message-State: AOJu0Yy12wHDHayfllzjwY6j9oxuTSZPpL+0lqLgfufbSOr1G9tSrzTC dAaHKgOo9tPd8z0xiNZB/mLRoOsAG7JrRcksVTg5beXo7vaJ0xWo+SBxHEJj1WI= X-Google-Smtp-Source: AGHT+IH8n+nmsJYFVIZGJmzndILHRpj0aN5unHTTwojRKIiOB2rktCNSIBo9mSCnI2OwpCiqNtBByg== X-Received: by 2002:a05:6a21:7883:b0:1a9:d9bb:acdc with SMTP id bf3-20020a056a21788300b001a9d9bbacdcmr5924624pzc.28.1714639655088; Thu, 02 May 2024 01:47:35 -0700 (PDT) Received: from KASONG-MB2.tencent.com ([1.203.116.31]) by smtp.gmail.com with ESMTPSA id q6-20020a17090a938600b002b273cbbdf1sm686805pjo.49.2024.05.02.01.47.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 02 May 2024 01:47:34 -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 , Steve French , Namjae Jeon , Paulo Alcantara , Shyam Prasad N , Bharath SM Subject: [PATCH v4 05/12] cifs: drop usage of page_file_offset Date: Thu, 2 May 2024 16:46:02 +0800 Message-ID: <20240502084609.28376-6-ryncsn@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240502084609.28376-1-ryncsn@gmail.com> References: <20240502084609.28376-1-ryncsn@gmail.com> Reply-To: Kairui Song MIME-Version: 1.0 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 84D1114000E X-Stat-Signature: dintpjymmhjtnecz3djesda3tpratafh X-Rspam-User: X-HE-Tag: 1714639656-387356 X-HE-Meta: U2FsdGVkX18QE1r44DGaXY+gZkSuusjO2+N8WV6jN01OkZZ3xqbFN7VDW8QepdpGaY3ana1KDNvWyYQTWNUIXUL/bOOOpAWA8sO94b+oqYbeRLXOk8Qo8CI9VnHPV8nXLGYUyHgCmP4cMy746hedMGynO93Mpq5mrOj5YeOzQY+EpybsGmZUIer4U6G8pSicHpB69ymNkeHPmQDskOz0TP0z3UsawHQXtrn423KLRU+1GoBgKQ2hh/pGsrkX1HvhID3AI4uJsaYspYpOWWlMMDEak2+ssJLt7jlwunhkytdKlraA9JNKJtq3w/xfXDF3c2x2jHOowqB6+3QokuvM2yyMExQkRe/ROTWGFnnvNPAJb4vw83IfUasqnDLur8xT+7f8ZtWfLaIRrCZhmxX0ZRLlUUuPFPbtsrs1PU5fLyFtbYjBOyQ+E7FPYY8FqKgnhcSwP1trrTzODloG18ddQxIQ9+3kh8aAdTc7E8GAxGHpDLCWBUgwtVjQ9qkslI7+hU+JyrKWI9U1olgiHnwixs5YvAMKkoJFSjsMLwf29b216VzVbl2G0+WuTsLXPWi7mLp2DhIV0Cbc0u5lIL2YbPOW7wxfSz6hfQ+ULVwUcAPsEVXF04WmbobzdNDkljIbGNkhViZq/vxp1oFnlzwO3dt5rh9TyOE2hp8CA8Brl8sgPdclv+tDKmHj4LiokfApuw4xRK+Cdr8wQa64vQLa44tDo14IIUtgcdiePM729OgAbsNjst8gssL+KSLkTO16R5B6FXpCPKPK2nUYHjHTfw8e7I9IG6redX3ohCjAz6VWyTn1VQgdCdn1mf97e2ZInjU5XC97VZLEKWyPYY50ULGwPNXMr4u0D+5xOyxkMKU6u3jASbt3YYGj07JxxFisM1gThX6wqR08c3ju5lnwHFgE79unkO3+hmCWYqoFROAm4XjHj4mQ3MI8x08XVAZDFGxHQExXZuqnmDRbkwK JVixV0Cp xwPvPa+MhO0/y0snZgbxrTR2seeAQBjOFGwHLiPumN0PrWV0rfFZQUUluG/hR42UnIWYWnYBe4ETC6DptaqRPILXInzsx12blgb6wmgGeW8kez7WOpPgC9vNlNPglbNvFeqxXp6vD5a1bc2urZ6VnU10hJ0WjWQyoOZHAjZ00ev9hY0LfzqMhrjaNQatj95P+TwIKwzL8pCR52j0elwUWWEEtOCNOlUcEoyYdkpfLYC7aeypJlQA73QfjDKNjb2AsbAre8FMv4PAvDN7pAUzS33CxFjzgDOKtSk0kOKe3zHi3NtPFNC6Qm8bXPw== 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_file_offset is only needed for mixed usage of page cache and swap cache, for pure page cache usage, the caller can just use page_offset instead. It can't be a swap cache page here, so just drop it and convert it to use folio. Signed-off-by: Kairui Song Cc: Steve French Cc: Namjae Jeon Cc: Paulo Alcantara Cc: Shyam Prasad N Cc: Bharath SM --- fs/smb/client/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c index 9be37d0fe724..388343b0fceb 100644 --- a/fs/smb/client/file.c +++ b/fs/smb/client/file.c @@ -4828,7 +4828,7 @@ static int cifs_readpage_worker(struct file *file, struct page *page, static int cifs_read_folio(struct file *file, struct folio *folio) { struct page *page = &folio->page; - loff_t offset = page_file_offset(page); + loff_t offset = folio_pos(folio); int rc = -EACCES; unsigned int xid;