Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2300841rwi; Fri, 21 Oct 2022 02:08:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Ut3p2V2BHWaatjVUDBeq+uDTDreQ/TI9HBd4T+IkGyzI003/yoqVkG1p1nL0rHbPVOom7 X-Received: by 2002:a17:906:58d2:b0:78d:9d2f:3005 with SMTP id e18-20020a17090658d200b0078d9d2f3005mr14032935ejs.697.1666343309723; Fri, 21 Oct 2022 02:08:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666343309; cv=none; d=google.com; s=arc-20160816; b=RdGXbdcDThIjx4bS5Tdh+kcqX3XCJoJZ76In9tMK8txUBXKi1an/8uLqQpybLZq5B7 QZORrBdT9f2UBEO4K4f64oSUSX+NsX8lDORhd55y7O1Ksxmlv62Lucd/g8oaaLNLxkVw tnEa6UI6owg3IY+lnwf3FZoSo4eK3UL6i6ox9kl6uUw4nP41UxmO1frsoUNEp2iTgr93 XF9F56pD1OmiTWhJvuvpUhL6+Ue2Egf0vPWkgsMX3mlNNO+zYeiqF7lzHTSYcFg9twTX JEagqiFAnjPWovsMqqQDU1nGnD9zW3WBjMNuDXmqgcdi8ZUlZo2YTsbZx47h6ylJwEvK 5q5g== 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; bh=TTV7fZMSgYAeQwWr6Y2ml6KK/nZql6QZDtzjjblaJ6I=; b=huroRr7ad4b/L2ztu7rNL4S4qu1RyqhrpPmnN+009xP8LwT9p9uQ/f/7jLbiGI/KSD 0exqGRje3n+7wOidEevWdNKpKtNhS8HrvvvCNqFj4J1yOwWZH99jh1lja8tdnqmQYkCa pfFG8mGCiO4c52ggl587GHv+bl3YKQsyb6u7PDXiym3mex5Vb04hwznOuLGKfrVE1em0 sBZvhnvYWnqPL07DnmNvFRnvwE6RvmXuXpDWBkca5gNKzouEc0i0z5mcjiz12urNuT63 odrHXIjBDmFNgyqOEC9KB1LnLpMIioVJoYCKI3ys8kZ0ERUJY2PAnqqJ2+kl1/pCfpC2 46Dg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bb12-20020a1709070a0c00b00791a6455597si7883964ejc.955.2022.10.21.02.08.03; Fri, 21 Oct 2022 02:08:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229849AbiJUIuI (ORCPT + 99 others); Fri, 21 Oct 2022 04:50:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229915AbiJUIuD (ORCPT ); Fri, 21 Oct 2022 04:50:03 -0400 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C39C13D49; Fri, 21 Oct 2022 01:49:49 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R291e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0VSioR4e_1666342153; Received: from localhost(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0VSioR4e_1666342153) by smtp.aliyun-inc.com; Fri, 21 Oct 2022 16:49:14 +0800 From: Jingbo Xu To: dhowells@redhat.com, xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org Cc: jlayton@kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH 1/2] netfs: export helpers for request and subrequest Date: Fri, 21 Oct 2022 16:49:11 +0800 Message-Id: <20221021084912.61468-2-jefflexu@linux.alibaba.com> X-Mailer: git-send-email 2.19.1.6.gb485710b In-Reply-To: <20221021084912.61468-1-jefflexu@linux.alibaba.com> References: <20221021084912.61468-1-jefflexu@linux.alibaba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Export netfs_put_subrequest() and netfs_rreq_completed(). Signed-off-by: Jingbo Xu --- fs/netfs/io.c | 3 ++- fs/netfs/objects.c | 1 + include/linux/netfs.h | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/netfs/io.c b/fs/netfs/io.c index 428925899282..58dd56e3e780 100644 --- a/fs/netfs/io.c +++ b/fs/netfs/io.c @@ -94,12 +94,13 @@ static void netfs_read_from_server(struct netfs_io_request *rreq, /* * Release those waiting. */ -static void netfs_rreq_completed(struct netfs_io_request *rreq, bool was_async) +void netfs_rreq_completed(struct netfs_io_request *rreq, bool was_async) { trace_netfs_rreq(rreq, netfs_rreq_trace_done); netfs_clear_subrequests(rreq, was_async); netfs_put_request(rreq, was_async, netfs_rreq_trace_put_complete); } +EXPORT_SYMBOL(netfs_rreq_completed); /* * Deal with the completion of writing the data to the cache. We have to clear diff --git a/fs/netfs/objects.c b/fs/netfs/objects.c index e17cdf53f6a7..478cc1a1664c 100644 --- a/fs/netfs/objects.c +++ b/fs/netfs/objects.c @@ -158,3 +158,4 @@ void netfs_put_subrequest(struct netfs_io_subrequest *subreq, bool was_async, if (dead) netfs_free_subrequest(subreq, was_async); } +EXPORT_SYMBOL(netfs_put_subrequest); diff --git a/include/linux/netfs.h b/include/linux/netfs.h index f2402ddeafbf..d519fb709d7f 100644 --- a/include/linux/netfs.h +++ b/include/linux/netfs.h @@ -282,6 +282,8 @@ int netfs_write_begin(struct netfs_inode *, struct file *, struct address_space *, loff_t pos, unsigned int len, struct folio **, void **fsdata); +void netfs_rreq_completed(struct netfs_io_request *rreq, bool was_async); + void netfs_subreq_terminated(struct netfs_io_subrequest *, ssize_t, bool); void netfs_get_subrequest(struct netfs_io_subrequest *subreq, enum netfs_sreq_ref_trace what); -- 2.19.1.6.gb485710b