Message ID | 20231221132400.1601991-11-dhowells@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 746A6C35274 for <linux-mm@archiver.kernel.org>; Thu, 21 Dec 2023 13:24:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 117C28D0018; Thu, 21 Dec 2023 08:24:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0C77B8D0014; Thu, 21 Dec 2023 08:24:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ED1C38D0018; Thu, 21 Dec 2023 08:24:52 -0500 (EST) 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 D6FA48D0014 for <linux-mm@kvack.org>; Thu, 21 Dec 2023 08:24:52 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id B06FA40DA3 for <linux-mm@kvack.org>; Thu, 21 Dec 2023 13:24:52 +0000 (UTC) X-FDA: 81590895624.07.BA41DE3 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf06.hostedemail.com (Postfix) with ESMTP id 0003718000B for <linux-mm@kvack.org>; Thu, 21 Dec 2023 13:24:50 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=dEFy2S9A; spf=pass (imf06.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1703165091; a=rsa-sha256; cv=none; b=ILpamoSE7A/GoPSTsQWD8CU9JMyBsaRRoyAn6bXuZsNYPP112sdxQX8CxqJiwtifNefTvJ wRvH4Xmjlt7kiFA9QNdpFfZ5wFmjN4nbjFajDdMMEuVyJxmJduLPJ0LFIvgS4kse2oCxKk AVmhlbwlRHte6r8dNGrL1MZCJsaS2t8= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=dEFy2S9A; spf=pass (imf06.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1703165091; h=from:from:sender: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=H0vMMTudDfb6r/qBW0AEkSH7nAY0KYX4o9qMLzBZ4rg=; b=fufyVrFkMFtQKic8K82XfWv7irPCIVlIGhbQ6zDH7uKYOOpYcze1Els10SpfEbe78iEBdf J8ZpMOBGmdYRKkKUZU/Ye11TWJGEYOHAxeZHpREHVvDyDi3916eW63Pp0U3EjOlKygV7aF 5qEcmudm9BU4wSbX6lt6BWAp6hixx74= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1703165090; 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=H0vMMTudDfb6r/qBW0AEkSH7nAY0KYX4o9qMLzBZ4rg=; b=dEFy2S9AluA6dYpfgztEYfpW5P4KcLg4lPefmIyLevXQVuGWxk87sSa0qjzdR/TUfxQi3S 9yQ7zdkvkXzDD1cqwtKkkWe679ADRH16Y+1rM1YVQjS9N6OMcQ9fxF4jBIJrRJIN6J5S+I CkHqPt4tbsiDFxw1+e6czjTb0gZGvzs= 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-206-7R1v-1MuMnWoS5GVhs_l5g-1; Thu, 21 Dec 2023 08:24:45 -0500 X-MC-Unique: 7R1v-1MuMnWoS5GVhs_l5g-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (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 0954485A58B; Thu, 21 Dec 2023 13:24:44 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.39.195.169]) by smtp.corp.redhat.com (Postfix) with ESMTP id 214632026D66; Thu, 21 Dec 2023 13:24:41 +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 v5 10/40] netfs: Add a ->free_subrequest() op Date: Thu, 21 Dec 2023 13:23:05 +0000 Message-ID: <20231221132400.1601991-11-dhowells@redhat.com> In-Reply-To: <20231221132400.1601991-1-dhowells@redhat.com> References: <20231221132400.1601991-1-dhowells@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 0003718000B X-Stat-Signature: b7aegk3kb4xrgofgj9a9zf6gzjrf3chp X-Rspam-User: X-HE-Tag: 1703165090-827635 X-HE-Meta: U2FsdGVkX1/aJ2+QvCIeemiC/2IByW0e8vBgD/Qg/nBvQl0PLrpYwl7jvqELcctjeVtsxfxtAmwUnhXlOBudGrT16ihbmn0KS21PXkEZY7gBca8DP0NBAPLKi6RIZplSfj5TLRCeyLzQ1HJlkX5uDuNeCuUke5dgtRIOu+QG3UccJYUbRFGi1q5M4EPxC1CRm54Wb0c5Lqjk3sPlmezAp13HV3oB5rAePHhLEv19WOxcwaWEPa94NkmjOFbOvdu0Euz0FPjeBkcpydjsTPY1OOgE6FnnfugzPAcdxKiLWCTAvqYHuT9WvlYPluhyFKKfYvBD3brvXefflpZHwEgFmzyjrWAytqUv3gCzBrjnB8Wk/DNG+1g1D3RlZUH1WCqX2IL3ekQurflckflv8R4kCl+8RPEGhQNGhtq5LPAtAGZ9pa9adPXd3rNfaehL9grthr2NJ5bpFj5yv88bRXwvQx0TGBtuHBDWndR9/j9SFwLZtomctec3pELLm820RfBgv6upgCnNhEsVR3Ol80PeHwBt9Z5AGyw2QWpKsky27WxJPlil94zzirQsyR64UGHHVYJv1dGe6iLa8vcsF++LkrtTppkz4w0SaNylYIqW1sUVd0xQEE9ZAaW01kzpMYdTyjUVTJ/MZmkmnu0yT1damh8yiXHEob/5Akk3DfwBkAr0GYZ9vJd8M6IlmNrDOBzlSGETbWNuylbvvUorvLR7ZtnJO8HdxK2fF9EetMbp63wYrSNnVn4x1mkd61YGMhcZcZZC5Btyk6bsBwsM0BZ38QpZIIdvINjHSgG2TkHFhSJgyknVqKlJbse9abAHvJxTzRxjyNtpw3b81EMHprJDwQDS86wRdUzD5mJHX4DR2vToq2b63rwEbMJUDsK+TN5F5z9GVjsflccu9csHghAeLDebci03vRJIFg7kH3NyNEk1Zo9OQuVyjmTvFn1uHDe/9+AQtb8vuspomK1LXxy aMcg20wy gVjOMSjimX/Qd+rkZAemdkzo6dURPXx/E3+qBgi8cy2d2vzLi7TQTe9feb9Ds1u+djVYJJ9OO/14NrxaPr0MX4H17C3EiYpDh2GsU6xugZKRy0uZ8+/yD+V4lSD0BhK2KQ0HM4Vs2UoFILVzfUfJ9UDRswu3UP87P645kTV/pSPDn2mpsC0y75fmP1b9XrqNp7Bu8au2EDEKb2+fiwd0idQrNGb1t928gLUx4HKW1bXNkOzbjGuYyqICAb7q1fyQevx4QVFdhTfMi7s/76CvgWuFrlOR8qNIZvE00KiOs8WZU+9STZ7ksidpiUyJJqjxTXjly57mnXFRoRxmXVQ7LfuBT1Q== 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
netfs, afs, 9p: Delegate high-level I/O to netfslib
|
expand
|
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);