From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f201.google.com (mail-pf1-f201.google.com [209.85.210.201]) (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 275ED3655C0 for ; Wed, 3 Jun 2026 05:30:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780464653; cv=none; b=WTej0Qct0ZUTBnX3t/7KNp57a/mGX0puDvlAxbjei7tewODZtfGfU9dPo8Mppe2j6tjQ+mHdVn9zmaQc6NtqLgVJ7XU7wBpKZzquXHWrIpZzCMZ3YlvsfSE15Ovr4xa8sbajlA1AcsLhimBGNBTexRtqwcvRAnya9FNUzWwk1IU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780464653; c=relaxed/simple; bh=tot9ZqSWBGLET6Y1NhxRj5tdJGhWtAUdv0XhxLmkMKI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Ud1t8h9Kn3Zv+m/371C+pvbPfp6eDa5ydDWeo9gYhtDwuKCtLf5YM1ZtOoxT+wUx93FO7sInirLKZWuOgocbpdQW7VgcylniOukf3tNdOrmXjCNMCrXgJCq/fJaUv4AXgrkCg3UR3gIXPruYZ43QUxTejm6QGduL1Qk/OcCS240= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--praan.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=MfxTM1Iz; arc=none smtp.client-ip=209.85.210.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--praan.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="MfxTM1Iz" Received: by mail-pf1-f201.google.com with SMTP id d2e1a72fcca58-842688fa7b8so281551b3a.0 for ; Tue, 02 Jun 2026 22:30:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1780464651; x=1781069451; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=niRreLs/kA/7tR4N81wD/w0wwhdK/GuCLzmPNYHZL+U=; b=MfxTM1IzO63cUav3J1GpraTC1uFcvnhH3wbiTp6YMWARicqQ9H7YtbXlRdQ4huwOJB Z42/vo9J4eZO1MTzYZFyn7uOfyOfDzCKoYXk3t9kKPyxeHbhEwXBn+CY6k8zltvlITmV c6fnSF+riw9QXPxN5rmgUnrdoDqWWG23uxGDoSHASf1IMXj0pKwy9F6ThBcc74cI4587 fPiyTJU0fXGkGB99867W/xUE+TZwX61bgMlSD+w3q582jTcxrUUSYrzTXBXhjv3XEtGZ kybNRfTg+2SH/Y5a38hBcHm+YysVyP9SOk8Sz5en3Zt8d69F8tnbsHa4NVaBouELhoiS ymHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780464651; x=1781069451; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=niRreLs/kA/7tR4N81wD/w0wwhdK/GuCLzmPNYHZL+U=; b=oYOW2OXWpOOXmc6AD4N9l7gWGkijBXGkntyQqYnz9yeqR/zLBtAI1TCUvbAR1/YF7i WUv6tQainglqpxmL4N/Nh89czP4NdpG0qVM2qSmj16BHzOmCS9aZYjt1T6a3wLGuYLnd zPE9gwLaJz92osNA5dZ7fRONuf6Vy1ubincLV5O6NBN9dA6E8T6Kp/AZDGX8BZl9oSG9 vuhAuMHP7nCSjte3Le3swjPyawsy9KeE9LVylF3f61XmR2jR0ULuVKU5Eo3F2ITZGsBI 6icWZbDbZWfUNc8u1YeH0N/hQNZKxcx/UUArhHpn+mz7gPLfxDAHZ+rSugewb3WGpKE6 7hvA== X-Forwarded-Encrypted: i=1; AFNElJ/qKd4PnM4otKljK3n77pqjfmYD+xufK4atwsgwAss5cPzojp28h8F+KG2l5FDZM19QrolNMFLeCl/2rD8=@vger.kernel.org X-Gm-Message-State: AOJu0YwJ3VivlyPpjdIaHy6NdWo0dlqKl88YTYMPcBkDNvvCrGSJAQc2 UUBHanN3sFx7YmG5roHW5BD6J+lWj69TVXnZ/lXAublMaG8ZHpXFEL7u/yHivNsp3ep6u0rjZ3j Wsw== X-Received: from pfbfx13.prod.google.com ([2002:a05:6a00:820d:b0:82c:90c5:5e0d]) (user=praan job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:438c:b0:842:614b:50dc with SMTP id d2e1a72fcca58-842859e0fb5mr1398765b3a.13.1780464651185; Tue, 02 Jun 2026 22:30:51 -0700 (PDT) Date: Wed, 3 Jun 2026 05:30:33 +0000 In-Reply-To: <20260603053033.3300318-1-praan@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260603053033.3300318-1-praan@google.com> X-Mailer: git-send-email 2.54.0.1013.g208068f2d8-goog Message-ID: <20260603053033.3300318-8-praan@google.com> Subject: [PATCH v1 7/7] nfs: Cleanup the nfs_page_create_from_page helper From: Pranjal Shrivastava To: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Trond Myklebust , Anna Schumaker , Christoph Hellwig , Christoph Hellwig , Shivaji Kant , Pranjal Shrivastava Content-Type: text/plain; charset="UTF-8" Remove the nfs_page_create_from_page() helper and its public export. Following the migration of the Direct I/O path to folios, this function no longer has any callers in the NFS client. Signed-off-by: Pranjal Shrivastava --- fs/nfs/pagelist.c | 35 ----------------------------------- include/linux/nfs_page.h | 6 ------ 2 files changed, 41 deletions(-) diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 74ae91151f83..be8e4ef998ac 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c @@ -427,41 +427,6 @@ static void nfs_page_assign_page(struct nfs_page *req, struct page *page, bool p } } -/** - * nfs_page_create_from_page - Create an NFS read/write request. - * @ctx: open context to use - * @page: page to write - * @pgbase: starting offset within the page for the write - * @offset: file offset for the write - * @count: number of bytes to read/write - * - * The page must be locked by the caller. This makes sure we never - * create two different requests for the same page. - * User should ensure it is safe to sleep in this function. - */ -struct nfs_page *nfs_page_create_from_page(struct nfs_open_context *ctx, - struct page *page, - bool pinned, - unsigned int pgbase, loff_t offset, - unsigned int count) -{ - struct nfs_lock_context *l_ctx = nfs_get_lock_context(ctx); - struct nfs_page *ret; - - if (IS_ERR(l_ctx)) - return ERR_CAST(l_ctx); - ret = nfs_page_create(l_ctx, pgbase, offset >> PAGE_SHIFT, - offset_in_page(offset), count); - if (!IS_ERR(ret)) { - nfs_page_assign_page(ret, page, pinned); - if (pinned) - ret->wb_nr_pinned = 1; - nfs_page_group_init(ret, NULL); - } - nfs_put_lock_context(l_ctx); - return ret; -} - /** * nfs_page_create_from_folio - Create an NFS read/write request. * @ctx: open context to use diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 14eb5de64d2f..2a3e066cbeb9 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h @@ -124,12 +124,6 @@ struct nfs_pageio_descriptor { /* arbitrarily selected limit to number of mirrors */ #define NFS_PAGEIO_DESCRIPTOR_MIRROR_MAX 16 -extern struct nfs_page *nfs_page_create_from_page(struct nfs_open_context *ctx, - struct page *page, - bool pinned, - unsigned int pgbase, - loff_t offset, - unsigned int count); extern struct nfs_page *nfs_page_create_from_folio(struct nfs_open_context *ctx, struct folio *folio, bool pinned, -- 2.54.0.1013.g208068f2d8-goog