Message ID | 20231207212206.1379128-9-dhowells@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp5072655vqy; Thu, 7 Dec 2023 13:24:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IF9qRJaWkyO+VWtwRyCeKi116Y6ABHGDJ0iahAkkWhyurzM5p1q/tfAlBjsxAjCly4K1nDa X-Received: by 2002:a05:6a00:14d0:b0:6ce:770b:a709 with SMTP id w16-20020a056a0014d000b006ce770ba709mr245709pfu.32.1701984297702; Thu, 07 Dec 2023 13:24:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701984297; cv=none; d=google.com; s=arc-20160816; b=PfVr3nAl/8gtTFd947pp8iwMhWcLW+b+PKoANVQV3AcKLGX2pRW/kKUrDq3lcyd3dZ GQZvBE4QhRXAO4XtKhCRBd3nUC/68Sek4yCTTvlybRvtzrdHRftHapKnbCQtatkUXzFZ CFvLpDQ/jxpapgfZ13SLhURsWcRevk7Fb5bI/48Ut8ys38Wst282BmTH3gvclV4ByEOB vAo7jgj5e/dI/BtftSPgR2V8NpqvhZym38ZP4xk4vxlRGNA7o/hpB6dLHkKrMbhAdL8S M9dT8CpPBxDcTtBwQ9yfrtblKV2HPGvl0tj8DM01boB4Y+Zt0cSNfUos1df7m0qygI8m V5aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=shWxGi+94hUVdbxc3FCgiKxDR0g1X33mrWTu84CcD7w=; fh=ib4gl95HfLmZdfX9QIMf3rTepWCH9JlNymcDKJTPhJg=; b=M0IbwFw1x5dAAuE9VGJ5XJlWAE7p+18GCboR7NNCDgyw4M0vcPBGlimk5shMLbEz2V vTvXmqD5F95qcNw7717wJ/NiGGIy6jhQ/ILbO2yZW5rI3TtC7s4nK8mmTU8eF3macY62 BUXVIvm5sWoDulf+0hosSmTo8mCtbWsZKonzKMnlPTKYc17T6HjTju3o7yCGUy/f+YRv JNtgc4FYjExbekxMah7vDzmiHqELYrlyMVcj3OoUMC8Fp8G/CQx4Id+nd7us8vbFqMOy Q1X4WlQuSHaZwmr+Dl1zDMBoxq2vbcwocdGYiDsVkokJF7r6K9Ce/AsVccldI03Gw7Ej xbDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RWQDQ1FT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id h14-20020a056a00218e00b006ced39ab596si126413pfi.293.2023.12.07.13.24.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 13:24:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RWQDQ1FT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D949E815CD8E; Thu, 7 Dec 2023 13:24:51 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235472AbjLGVX4 (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Thu, 7 Dec 2023 16:23:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235323AbjLGVWx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 7 Dec 2023 16:22:53 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE6AE12D for <linux-kernel@vger.kernel.org>; Thu, 7 Dec 2023 13:22:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701984162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=shWxGi+94hUVdbxc3FCgiKxDR0g1X33mrWTu84CcD7w=; b=RWQDQ1FTbu/dYfiHg/naV2EfR8ztcufZ2yjFa1e5OxVzP3cCaYmpAVFCr11CEmuiSqIrDi BCaOaORY/VxitDmsla+1y+6Pl1nWs5ZZe9AOQbDzDfM9no20tGo4Y8x0vIKJ2kRZ2owB9s Q72916impvKUf/77eH/xYTkt+yludKg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-607-x7mvjHNlOQiZNHCPmJ_SPg-1; Thu, 07 Dec 2023 16:22:39 -0500 X-MC-Unique: x7mvjHNlOQiZNHCPmJ_SPg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7E5F0185A787; Thu, 7 Dec 2023 21:22:38 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.161]) by smtp.corp.redhat.com (Postfix) with ESMTP id E42301C060AF; Thu, 7 Dec 2023 21:22:35 +0000 (UTC) From: David Howells <dhowells@redhat.com> To: Jeff Layton <jlayton@kernel.org>, Steve French <smfrench@gmail.com> Cc: David Howells <dhowells@redhat.com>, Matthew Wilcox <willy@infradead.org>, Marc Dionne <marc.dionne@auristor.com>, Paulo Alcantara <pc@manguebit.com>, Shyam Prasad N <sprasad@microsoft.com>, Tom Talpey <tom@talpey.com>, Dominique Martinet <asmadeus@codewreck.org>, Eric Van Hensbergen <ericvh@kernel.org>, Ilya Dryomov <idryomov@gmail.com>, Christian Brauner <christian@brauner.io>, linux-cachefs@redhat.com, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 08/59] netfs: Add a ->free_subrequest() op Date: Thu, 7 Dec 2023 21:21:15 +0000 Message-ID: <20231207212206.1379128-9-dhowells@redhat.com> In-Reply-To: <20231207212206.1379128-1-dhowells@redhat.com> References: <20231207212206.1379128-1-dhowells@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 07 Dec 2023 13:24:52 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784659887211280858 X-GMAIL-MSGID: 1784659887211280858 |
Series |
netfs, afs, 9p, cifs: Delegate high-level I/O to netfslib
|
|
Commit Message
David Howells
Dec. 7, 2023, 9:21 p.m. UTC
Add a ->free_subrequest() op so that the netfs can clean up data attached
to a subrequest.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: linux-cachefs@redhat.com
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
---
fs/netfs/objects.c | 2 ++
include/linux/netfs.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/fs/netfs/objects.c b/fs/netfs/objects.c index c4229c5f3f54..1bd20bdad983 100644 --- a/fs/netfs/objects.c +++ b/fs/netfs/objects.c @@ -145,6 +145,8 @@ static void netfs_free_subrequest(struct netfs_io_subrequest *subreq, struct netfs_io_request *rreq = subreq->rreq; trace_netfs_sreq(subreq, netfs_sreq_trace_free); + if (rreq->netfs_ops->free_subrequest) + rreq->netfs_ops->free_subrequest(subreq); kfree(subreq); netfs_stat_d(&netfs_n_rh_sreq); netfs_put_request(rreq, was_async, netfs_rreq_trace_put_subreq); diff --git a/include/linux/netfs.h b/include/linux/netfs.h index d6f27000eeb0..06f57d9d09f6 100644 --- a/include/linux/netfs.h +++ b/include/linux/netfs.h @@ -214,6 +214,7 @@ struct netfs_request_ops { unsigned int io_subrequest_size; /* Alloc size for netfs_io_subrequest struct */ int (*init_request)(struct netfs_io_request *rreq, struct file *file); void (*free_request)(struct netfs_io_request *rreq); + void (*free_subrequest)(struct netfs_io_subrequest *rreq); void (*expand_readahead)(struct netfs_io_request *rreq); bool (*clamp_length)(struct netfs_io_subrequest *subreq);