From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f202.google.com (mail-pg1-f202.google.com [209.85.215.202]) (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 D779D33BBD0 for ; Tue, 16 Jun 2026 13:40:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781617220; cv=none; b=RdNp8EM3aZXaPctt+FMUt128DKEQMLS1Z86k63NTQqtN57AyHH6mKIfcEUBJYwVzJ42VmG3q8ApYCItMMWV4I72s538rBbFUsuXkqU1CYnY6P49eGSNFC6+ClN5IPN4i4bAPalG7nXwcOXYJjEE41WAbu2GHSsUCbiBn9Kj+fd8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781617220; c=relaxed/simple; bh=52Xcw20XizqMsLy6fUfMk1Q9086tQK9VUAU9mj5qZ9w=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=PXqeM4qNJjuRhzeI+TdwbWnlWJU578AHi5ufhJ8CKnCTq8mgxGKbUR9PGVdvIuVZ7RCG9Z508YEabWdWXqKBkAf2/UUDE4qgQ4m6oKMs3p8yGChN8nxbguq1vHRMGT3LQZxGOUwaenJa833V2voBjCNnrqip9p/TYrTco/9pRfg= 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=FLQ2NwDM; arc=none smtp.client-ip=209.85.215.202 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="FLQ2NwDM" Received: by mail-pg1-f202.google.com with SMTP id 41be03b00d2f7-c8592a62f32so2340724a12.0 for ; Tue, 16 Jun 2026 06:40:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1781617218; x=1782222018; 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=KBS3MV/jBlZa3OBaRQogx3+4bUtSlfAihXqUkT3o36c=; b=FLQ2NwDML8DX9DqeUqgwV/nWVeiSPpp9bguWN/6Q6l00kBAidbnVrygtvtYDQPv1cW VcecxndIaqswPLGFk+rWmjZwIp49PPuYZynCwhqhqXJAMLN63DQYqMP8XhY169v1PObn GYOniU+GeKlWVRl5JseGFoV73nX2zBdcVa2XOGudqdL2BPGAiAfbalEpw7Ea4PLVyc1j ajVUI6Ltoi3Efr4hqWXX6Ae6/7zS52LMQGvk8l9MKP2y0gEqO4LDFtzljKM4OM2pdKce cOf8r2MMvmzSCmrNVXR+KGlYK40bX2usEwEcKxbbt8nP3yljF3DJ2Wxmc1IATLlUBddo TuJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781617218; x=1782222018; 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=KBS3MV/jBlZa3OBaRQogx3+4bUtSlfAihXqUkT3o36c=; b=rH40o1mcPIMlb4yDCa2maKd24ZJQ2PBjiCkSsY56vOKteW4AMLBRbqwgTii9tyIRNa ULy5lkhUNDtXxxaLhDarY84c8ajAdvH7UiFLjltnyoycJIZaIv3AAVBOOovdRCVBPs5d KDRV+G/aYvke4Key2BfqeVZcWsArWMMJN0AxmZELkd7YrFCly9k469YwXbDmBDiasu7b xkc4ckkBWUlgIyiMOSca0dXFvb8JSUMh2FHuv8T8LP56ol3SiIwRDxL/sTWj+MZgIDPX sIaqXVDLvWHnLwNCHfbqUgiaMHFfwWGhN3LKUkXdJUvLiUZwfLZX8dLw0ZPecDymTdHj +rCw== X-Forwarded-Encrypted: i=1; AFNElJ9pUj065oEucj757FbYrxB/N5S+IGe2xgknELH9domGyZ54H9J9yEDqotcekS/HIACNjMGQQNc9FjcDePo=@vger.kernel.org X-Gm-Message-State: AOJu0YyyzjnVkotFwXVyj+Q2qGKU4CInktFVRRqNpnDdj/yKYxCukJsm Mh7Kaf+9PDRrJ+ncGe9k1+Xqcye7EmRj69kS2a+psZ9Hj4T6wZRjqxor/jAs5ECONmGS/y7m+ms eAQ== X-Received: from pgve17.prod.google.com ([2002:a65:6491:0:b0:c09:15e9:db4e]) (user=praan job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a20:ce46:b0:3b4:8aad:6337 with SMTP id adf61e73a8af0-3b7e49b8c55mr4314931637.15.1781617217983; Tue, 16 Jun 2026 06:40:17 -0700 (PDT) Date: Tue, 16 Jun 2026 13:40:00 +0000 In-Reply-To: <20260616134000.2733403-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: <20260616134000.2733403-1-praan@google.com> X-Mailer: git-send-email 2.54.0.1136.gdb2ca164c4-goog Message-ID: <20260616134000.2733403-8-praan@google.com> Subject: [PATCH v2 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 | 36 ------------------------------------ include/linux/nfs_page.h | 6 ------ 2 files changed, 42 deletions(-) diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 569bac4faff7..56d397645cc0 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c @@ -427,42 +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 - * @pinned: true if page is pinned - * @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 d23208ed3a33..86d0300075d3 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h @@ -125,12 +125,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.1136.gdb2ca164c4-goog