Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3537905rdb; Sun, 10 Dec 2023 09:32:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IEFKdo5bAYXHVWqUPZk8JQz6kg13g+S6EBLfnwW1tsUzNIEXgSxsxJQ5D5ZkTSR8BLJ0yVV X-Received: by 2002:a17:902:d512:b0:1d0:b32e:c808 with SMTP id b18-20020a170902d51200b001d0b32ec808mr3909513plg.26.1702229552221; Sun, 10 Dec 2023 09:32:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702229552; cv=none; d=google.com; s=arc-20160816; b=vluQIq3k6Em8jUvPovXqujwQ+C1VR8+Ti3CHWz+/ZCa90WzxUIFx+oMJrFME+zMTgj iWnYHrsJw8RtQjRV1J3GNZxlrBY5EFVhUcN/WeDU4iO1ATaFznHCaBy8JM34oYuudIHw Y7TWhbiRQrC6UvqVvSz1qM/gyXs2zVv9bSVp3tLePt00DQsIYUKD6mLPw0N51efyfLdi PwkBPJS7WTk/Z99Oc4ILVGXiqoNeuP9W8KIpcvZeOv1YlyrIHx9m3qyjgcSMt/4Khtx2 mBqEw0R/5xrGBX54H1V+6OTIuwXhozhbf3ZAjYhyyyOtT0jLJQPKubj1OAbFCkL9AHoY LRnQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=7R7swsMSVHfAzgaVMpMek+u6m1tMZkWO2VT0rabXWAg=; fh=TO85W+MECx2yk/kFcLO4zwHjgtLS5vIk56JfdgTquNM=; b=a0V2XMuDWIHN8YO37pcOf5kNbo8Dk6azQ6rdjta3emlQ6nVJvY2CrBUw0XIypyaISU a4lVhB/GSmabP9FPE2IcI7C4P9mo3p+jEL8Jd2e2rb+QYlbsxOz0xLADY2ejYmjUcA/n RxFcsNWINWuhgTFTodPWmm0VQHantR9WuuidXtGOWTEmcCPaC8pBBwYavCc69Q/oRAqE 94ICaGsckqAQ0xMEuNHGSH/LRqIuNXt3Md3YYxF5js59J/UOyGEjDRUW4S30hBMeTnhY dbipi5UicSO5DqWiYdstoLw0gCm7BWp0gWCEyl1xuoc1COZoM4/A+Jr9G4BMBvIVrAcF +CGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b="ae4o7v/M"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id d20-20020a170902729400b001cc282684c6si4709592pll.278.2023.12.10.09.32.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 09:32:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b="ae4o7v/M"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id EBCD2807365E; Sun, 10 Dec 2023 09:32:29 -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 S231932AbjLJRcR (ORCPT + 99 others); Sun, 10 Dec 2023 12:32:17 -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: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=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: 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]); Sun, 10 Dec 2023 09:32:30 -0800 (PST) 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 --- 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 >= 0) - ida_simple_remove(&eventfd_ida, ctx->id); + ida_free(&eventfd_ida, ctx->id); kfree(ctx); } @@ -395,7 +395,7 @@ static int do_eventfd(unsigned int count, int flags) init_waitqueue_head(&ctx->wqh); ctx->count = count; ctx->flags = flags; - ctx->id = ida_simple_get(&eventfd_ida, 0, 0, GFP_KERNEL); + ctx->id = ida_alloc(&eventfd_ida, GFP_KERNEL); flags &= EFD_SHARED_FCNTL_FLAGS; flags |= O_RDWR; -- 2.34.1