From patchwork Mon Apr 29 19:04:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kairui Song X-Patchwork-Id: 13647545 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 DDD02C4345F for ; Mon, 29 Apr 2024 19:07:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 728BB6B0098; Mon, 29 Apr 2024 15:07:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6B0F36B0099; Mon, 29 Apr 2024 15:07:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5519D6B009A; Mon, 29 Apr 2024 15:07:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 394F26B0098 for ; Mon, 29 Apr 2024 15:07:15 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id C2E22C01EC for ; Mon, 29 Apr 2024 19:07:14 +0000 (UTC) X-FDA: 82063502388.22.FFAB363 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by imf08.hostedemail.com (Postfix) with ESMTP id F28AB16000A for ; Mon, 29 Apr 2024 19:07:11 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=WuZy39FV; spf=pass (imf08.hostedemail.com: domain of ryncsn@gmail.com designates 209.85.214.175 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=1714417632; 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=xZhQjIqoZ+Dzvi7kV/KmeZKZ39va/VtfWTmYeEwmXIdCW7c1GYRlGrt6w3bUEYw/LxjK0x Gtfc/yF6hCS1Hy1MZSwEk8YS6aiUNy8hiRuYJDKus7s1C3iEO2gY8mcPIWzc8APRFCnkC8 2WADWEQiluqUWuKwJ9obni0Jn60swV0= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714417632; a=rsa-sha256; cv=none; b=JCmc9rGqEglKRbXhjd6hh7gpmfGc8TFNLush5M5Ijb6Ce8MGoTev4XNO+DunOUvAKtmlRG 8txHvY54Df+vMrin3i7qmrYQZh4ry+S9qTydWrpfDZmu9/+HV78VAeVDMBrtdk7zINV22M HCkIdQrto+NmBeI3qXGaEetmJHYNwnk= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=WuZy39FV; spf=pass (imf08.hostedemail.com: domain of ryncsn@gmail.com designates 209.85.214.175 as permitted sender) smtp.mailfrom=ryncsn@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1eac92f7c74so37677055ad.3 for ; Mon, 29 Apr 2024 12:07:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714417630; x=1715022430; 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=WuZy39FV/m7nohuUjMVZpheoq1ldkQ56D2dXxkG05TfIiPnf1bU0Vg9uxfAxlAiWce hJdG+d9j8MAj/jJ0PLBaZ/8QLx03XmIFjA9YkfOEGh+RGKixjdygYUTVuHAEOV7Yn1O0 nPIRuhF/9K4Y/uevGrs52Kwwdfy7iNKWko666cg6vOy28wCyQQqXr0KfI5LS2ne2qKrM 6d3kOc/7ZLFo+KphPOo8cuFXCViYMTrFHV4cHxrgePBc1s17oB2ymmW5Wexr70X0s+Lj ZMBLc2eKFsSvxYkgZM4DDeaoYQLB6GOuQbnni2s5mEoqMqXdZNd5V7wJenRrVePamvT3 oNWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714417630; x=1715022430; 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=MmxRb+hCqgFkn7c1JMztw1MTWv4pM+5pzQswcVlcVYFrP7dWmYsboI0wKRl0B6xzrE p7tygTK8Yf72MN0JNx6rhTWvTlIi3VtBovrvKWCPgVbEtjSDsUb39j3WunTT6Jjvk5mf COt+UzGPXAYYXEwbphjUdMwD1xhbX/5u980ObZo6c1pyDWWrujUrZYJ7z2wmAyMNjUIh P2bsKRcd+vI5Iq3N4BsmTUChrcJEisTyKV3eBfWcS/QPaApRxi6ow3CH6NuF5TS5mhl3 TMxC17MKMK2Xq/0R3Nu8SplNTsc2yJsMgHze2PdZWEvdWuI6JanQI2Hne6fCbLAtgE1j L08Q== X-Gm-Message-State: AOJu0YzKCwwn8U6yDXyJsuTmsJoktjhhcTG+jXIW0tQLYkt/ZoHhcULJ G2AZ2Do/Zfq9Px4YP+jPZn9J44BqUEcB/55l97wV1AhAaEYr5I5/rmF5uwRehKo= X-Google-Smtp-Source: AGHT+IHTYDIYUhd7xIT9MpX0t66Q+G0hrqubyFH0j3AGRIM7zO+0pTNEqaULQZkZmC4aZ0qNTe1Z3A== X-Received: by 2002:a17:902:da88:b0:1eb:5a92:c939 with SMTP id j8-20020a170902da8800b001eb5a92c939mr707490plx.29.1714417629601; Mon, 29 Apr 2024 12:07:09 -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.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Apr 2024 12:07:09 -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 v3 05/12] cifs: drop usage of page_file_offset Date: Tue, 30 Apr 2024 03:04:53 +0800 Message-ID: <20240429190500.30979-6-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: suuhnoainfgisjeetzz6faqga9gmcaxn X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: F28AB16000A X-HE-Tag: 1714417631-926072 X-HE-Meta: U2FsdGVkX18WuJEshVo1dsZzXP7WikMUhMnOMEFHf9LdodnZKOGUPQJMkhBlyus99qjAPawihXAzR06jXBeJhK32ujvr9YJ62FLhGGxtz0Cg0+n59a6sH9EFV2L84QLESfoaKYRFoDKhRgVj9nQU1eGmoZftM17k2964QarGgzKamS6WH1A30Umefjme5jnzex0HXm3bKFxnyACOYCBMmfFslBitBVjpFYcyJigX2sV2UvKJdjDDc4SHJYmIdaOqfku5LEi4ce27+pZcS9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K8j/jAheDoXF8A2sNNdPRU6jGRz1C2JbtVn53CaS1UGt7aaeulyGZ5W8MdDSgzCv13bhpl4EfghaJRV7XzcxPfc/gfk3qRfbkT3v8MYHuMW2WwBnINCiKZpWzKpfWbxAv2PS0ilbLiEs8HzyGkcE6/eLvcX5CPKbv87FUqY+bP44IO9aVRXgwUErpFi4sDyL5gYUiWhGg8NUYNrOahCvpu26teipj6bOSAwTcLXXwQIAuwvU8sHswDm1B51pgf5Z8kDnzT/K2tqgWdKK8kM+0C7CyEcEwIwlKIUmiHt/6v9x0rTIif4LLhzVK0GWTAl95CfVyPJzzW8EqktzGoynEGa23r/nP9Poj/YJd4nTc3TT+YjCymxjCOUJJbnhydTC424rZ7J4vaeXCuAiz0qbhMJa9W803TPujRaEfy4gTFh+8Nryi8VoYwJzzr2xc/+LLHbX6gnA== 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 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;