From patchwork Fri Aug 19 12:19:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dylan Yudaken X-Patchwork-Id: 12948783 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44CEAC32771 for ; Fri, 19 Aug 2022 12:20:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347980AbiHSMUy (ORCPT ); Fri, 19 Aug 2022 08:20:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348826AbiHSMUx (ORCPT ); Fri, 19 Aug 2022 08:20:53 -0400 Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com [67.231.145.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34AAE100F28 for ; Fri, 19 Aug 2022 05:20:53 -0700 (PDT) Received: from pps.filterd (m0148461.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27J9qbvB013252 for ; Fri, 19 Aug 2022 05:20:53 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=facebook; bh=xWBhyNCxqxHdjrQUDCLN/F9/P/3H9ArEujSv2w2262I=; b=GdHOwjUBqnHA2SA3bIE2BikFeI87yxSf4rtL1FRaBbnGlzgUYdseBsQ6dHsSNMH0c39z RjK9WxpZx7rCpCXc5Tzj70mhhmU2iD2zWDJj83xOfMWc2k5h+sWE+K4QvI+ADYmChBqS BYzvdMh7yzkq0iuT0tb2E6GS5Vkb0xvz208= Received: from maileast.thefacebook.com ([163.114.130.16]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3j21xrahm3-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 19 Aug 2022 05:20:52 -0700 Received: from twshared14074.07.ash9.facebook.com (2620:10d:c0a8:1b::d) by mail.thefacebook.com (2620:10d:c0a8:83::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 19 Aug 2022 05:20:40 -0700 Received: by devbig038.lla2.facebook.com (Postfix, from userid 572232) id 0F2F04CEF050; Fri, 19 Aug 2022 05:20:26 -0700 (PDT) From: Dylan Yudaken To: Jens Axboe , Pavel Begunkov , CC: , Dylan Yudaken Subject: [PATCH for-next v3 5/7] io_uring: move io_eventfd_put Date: Fri, 19 Aug 2022 05:19:44 -0700 Message-ID: <20220819121946.676065-6-dylany@fb.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220819121946.676065-1-dylany@fb.com> References: <20220819121946.676065-1-dylany@fb.com> MIME-Version: 1.0 X-FB-Internal: Safe X-Proofpoint-GUID: Jzf8msyK9p4xJDKFtOQ82CShHzsMQTvX X-Proofpoint-ORIG-GUID: Jzf8msyK9p4xJDKFtOQ82CShHzsMQTvX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-19_06,2022-08-18_01,2022-06-22_01 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org Non functional change: move this function above io_eventfd_signal so it can be used from there Signed-off-by: Dylan Yudaken --- io_uring/io_uring.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 6572d2276750..509bb52d15f3 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -478,6 +478,14 @@ static __cold void io_queue_deferred(struct io_ring_ctx *ctx) } } +static void io_eventfd_put(struct rcu_head *rcu) +{ + struct io_ev_fd *ev_fd = container_of(rcu, struct io_ev_fd, rcu); + + eventfd_ctx_put(ev_fd->cq_ev_fd); + kfree(ev_fd); +} + static void io_eventfd_signal(struct io_ring_ctx *ctx) { struct io_ev_fd *ev_fd; @@ -2467,14 +2475,6 @@ static int io_eventfd_register(struct io_ring_ctx *ctx, void __user *arg, return 0; } -static void io_eventfd_put(struct rcu_head *rcu) -{ - struct io_ev_fd *ev_fd = container_of(rcu, struct io_ev_fd, rcu); - - eventfd_ctx_put(ev_fd->cq_ev_fd); - kfree(ev_fd); -} - static int io_eventfd_unregister(struct io_ring_ctx *ctx) { struct io_ev_fd *ev_fd;