From patchwork Tue Apr 23 17:03: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: 13640392 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 DF999C4345F for ; Tue, 23 Apr 2024 17:04:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 67FA66B0149; Tue, 23 Apr 2024 13:04:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 608356B014B; Tue, 23 Apr 2024 13:04:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4812E6B014C; Tue, 23 Apr 2024 13:04:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 2392A6B0149 for ; Tue, 23 Apr 2024 13:04:18 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id D0E8F80C3C for ; Tue, 23 Apr 2024 17:04:17 +0000 (UTC) X-FDA: 82041419754.22.C6489CD Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by imf07.hostedemail.com (Postfix) with ESMTP id 02D0740004 for ; Tue, 23 Apr 2024 17:04:15 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="Y54/+xPb"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf07.hostedemail.com: domain of ryncsn@gmail.com designates 209.85.215.169 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=1713891856; 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=GV/G4qXk1onz2IqC3/BpNLYGtgLEbJph1C4Exu3LQ8Q=; b=GltMie/7IUUjKRGWI94lIcb11wD+cYc3y7wHdNRlr4EFvGzAR2XUVboh+QJf+iYr2YNdRF zRhTkihZwTVQ4LILMuN5s5doGcIGabeDyPruBI3awbr2maz9HJ7MydFaGWTGS04DAjNIRg qu9HFCO/03XBOK+iZbzkqcmyoERGjhw= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="Y54/+xPb"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf07.hostedemail.com: domain of ryncsn@gmail.com designates 209.85.215.169 as permitted sender) smtp.mailfrom=ryncsn@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1713891856; a=rsa-sha256; cv=none; b=jvg2ACVHKB9AXFKzf3YVyigXcVEPHwsvz6ijdMmKnmVX1jPD5VZtT/QCi7GcAGI2hoP+sD 8wF1HLUqCLp/tPEDMFa7JPpZJtib1tA4GCa92O5dmgpsJjYAvSqsMbh/QV4Ew3M1xxb9D1 UPBxAic9wGESreAQ3XMWShVFs77xdzw= Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-5dbd519bde6so4192564a12.1 for ; Tue, 23 Apr 2024 10:04:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713891854; x=1714496654; 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=GV/G4qXk1onz2IqC3/BpNLYGtgLEbJph1C4Exu3LQ8Q=; b=Y54/+xPbgftcb/iRWc6nLMMTFw4nT5IsqVfcu5qxrgoMFA1osgfDOHrqqea8Kw/V0u i1VexfDjRNHF2IkhVIqsRyjoGWhOQ1+1oGjcSjml2EBs1SsgYdndcWCf2g4OcELpiH9q bmeDZyrjIR4GSz62rujPgPkJUTIbBOBr7cd8WGeVGvB1zBNKZNglA55Oct7DLDt+5nkW nJPpqG+cVzEnE1A5tbSovhFUzd0RR4f5e2GUUMP0zqNs56EWPwQU7pYsZXXITz0bD9TJ WIWETr5Y/sbPhruTaN30xDeZws11xM2jghvugIXpZQ7ZxBiTQX/ja2rROlGrSg3QZXO8 iDGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713891854; x=1714496654; 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=GV/G4qXk1onz2IqC3/BpNLYGtgLEbJph1C4Exu3LQ8Q=; b=d/ltc3wF2nDtQdvc83EnQujJZjJezGwKlS3Y0gq+Io72PHbz6CMcNb6Rty72ROpZ6D /zUEiC/cKBoxByv58KaFdskwVqVyAnYSmLjgSnxO5Py72HEnpZUYo1oCJpCWoAcHCETz qvW9ctADfC3RXng+JQx7GJH6C5iFjFO8iYsVfmcrSmpzDSWcTvJmCu2n+7r7DFc0zITf V5pACci7V8Y6ADLdEW14qzvKGouqLw6Mo958mSplt/XISyL5sJREL/jkdyB6QPLX15uf 73TsiM7zZuQv6m3lXfPrhOw+bBsxhKD4mFezyqjAgu3/FpdxvPaZgAIg/1sRDcDr3aGa xvzw== X-Gm-Message-State: AOJu0YzaVVThcSPsaRCsQjbY+TU9opr0gC/1yTdS+lY0tp9bLvC1u2bz /hwrChHfjxcSk087rUeK+HsigabSmEyXZfN6LduwT0pxoJh17sXNqV6p9AR1JrbhNw== X-Google-Smtp-Source: AGHT+IFXnXzggSbP9Ki4cPzdCkuwcEVn65pZLG0YlEPbx8oPpQU9xrUurI5P4h73FEaKFW5G55uUNA== X-Received: by 2002:a17:90b:3796:b0:2ad:e055:bb34 with SMTP id mz22-20020a17090b379600b002ade055bb34mr6180074pjb.3.1713891854019; Tue, 23 Apr 2024 10:04:14 -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.04.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 Apr 2024 10:04:13 -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 v2 5/8] cifs: drop usage of page_file_offset Date: Wed, 24 Apr 2024 01:03:36 +0800 Message-ID: <20240423170339.54131-6-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 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 02D0740004 X-Stat-Signature: i6z6d6kzqzij4r1jrc6t96ntorc8hfnb X-HE-Tag: 1713891855-323617 X-HE-Meta: U2FsdGVkX1/WoPX+7FhSsCIhI7KGnQ1FoeKse7FH0HJX0lkkfUFu97rFkje6NHaRkCX0WTMNy9hj1JzYOHw3VQGYv9xl7uxbolPLMkRRw85okt65uyXTY+/zr4leO1b7ZDcAfESaRqqGnk19Tg6uhjltdR73aaRsucC5xoW47xIWTA1+mmpEpbBjlDwMn6vgkg2LwkJhiJXhdqp37MAyb4cfVBc0zXKYJGkpE2MWKg0DfPxzaDSdaH3cEoP9RS9PifH3+j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hrzaYtWMVhWywfO/cclb5AQsQAD7qnuIyDzioHthoLG4RYHcmEBCs5kbvVDI5RBzSS2MGXkbcm1JBzX4Bx5cTI+l05tKOeUlCFY68Ktw5aRRPFqguLi1FhMc7g84K9bB5xBDuljBFnE0SrD++Zz2GyDMV/vpx9NJRUM0Kek1btiAgr1+4NJHI9SoGQzNt/wE1gx+fyVS9mM3keN3EEuRsOc6dla1O6NAwy0zy9Qfz92wcbkSNJwGwR1AOjx7xpVHZKY+5ZUMTcl4X7Q8uhVOWANUUes2KtG67IjnlGPTV51MnNLcqQGELhC5ohE81LfT2RYYwNWIi6GTmfMUM2ItfnW0dgzjb+tp4TGW/NU1QZ2tWb0I0VPllK4VmxkfUGOrCslcSURLy+UiyqIVWEeW4LKum3vR0Z6KYhyoGKfHfyUyZm2cMFYLo/QqEJpxn+Wjf0/FDhkhtE0zSm89J34i3Lu/07FQ== 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 Signed-off-by: Kairui Song --- 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 16aadce492b2..56ebc0b1444d 100644 --- a/fs/smb/client/file.c +++ b/fs/smb/client/file.c @@ -4749,7 +4749,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;