From nobody Tue Dec 16 16:42:34 2025 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 A8456C4167B for ; Sun, 10 Dec 2023 17:32:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231929AbjLJRcS (ORCPT ); Sun, 10 Dec 2023 12:32:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231861AbjLJRcQ (ORCPT ); Sun, 10 Dec 2023 12:32:16 -0500 Received: from smtp.smtpout.orange.fr (smtp-24.smtpout.orange.fr [80.12.242.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D61C2106 for ; Sun, 10 Dec 2023 09:32:22 -0800 (PST) Received: from pop-os.home ([92.140.202.140]) by smtp.orange.fr with ESMTPA id CNfArZE5YMO0QCNfArYiy3; Sun, 10 Dec 2023 18:32:21 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1702229541; bh=7R7swsMSVHfAzgaVMpMek+u6m1tMZkWO2VT0rabXWAg=; h=From:To:Cc:Subject:Date; b=ae4o7v/MuPampl5degm+HCMI8B3Q9AJOxB0cLwF+02eFNh3cGN6E/yK0yk8qorsVS 5n1FzNxiqP9Xy37TozLxocH4ry3B4R0ro3DpLtZQuNGbJHpxGzkUMSMJYM2/V+ixVW sWvxJNPdjuGMVvoF6/GiKgnG7j6jLSqo2uDNiLiJ4O6DBWAqQn4tbXHgWMTdWntZKY bxsYpx9Iey7sfoa8q2e6z7q0k0zdGBMOVrsNy3XDbOoQu32013IjbGMZG0YZ0ocNup bUux/Wl5JUJfbUwCYJl8r83RDDA0gxmhVsMwtdtTHihaJBvX/nhbPLXoyepiTkW5/G qg/Hi8SfyuI+w== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 10 Dec 2023 18:32:21 +0100 X-ME-IP: 92.140.202.140 From: Christophe JAILLET To: Alexander Viro , Christian Brauner , Jan Kara Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-fsdevel@vger.kernel.org Subject: [PATCH] eventfd: Remove usage of the deprecated ida_simple_xx() API Date: Sun, 10 Dec 2023 18:32:18 +0100 Message-Id: <575dcecd51097dd30c5515f9f0ed92076b4ef403.1702229520.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Reviewed-by: Jan Kara --- fs/eventfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/eventfd.c b/fs/eventfd.c index 16bea05a7c78..ad8186d47ba7 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c @@ -82,7 +82,7 @@ EXPORT_SYMBOL_GPL(eventfd_signal_mask); static void eventfd_free_ctx(struct eventfd_ctx *ctx) { if (ctx->id >=3D 0) - ida_simple_remove(&eventfd_ida, ctx->id); + ida_free(&eventfd_ida, ctx->id); kfree(ctx); } =20 @@ -395,7 +395,7 @@ static int do_eventfd(unsigned int count, int flags) init_waitqueue_head(&ctx->wqh); ctx->count =3D count; ctx->flags =3D flags; - ctx->id =3D ida_simple_get(&eventfd_ida, 0, 0, GFP_KERNEL); + ctx->id =3D ida_alloc(&eventfd_ida, GFP_KERNEL); =20 flags &=3D EFD_SHARED_FCNTL_FLAGS; flags |=3D O_RDWR; --=20 2.34.1