Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3932878rdb; Mon, 11 Dec 2023 04:30:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQ9r9nRnsscWlKH3J0c+//sdZdb4B+mgULxDuVQAzHDllskHvF5725AQYuMsqn9v3cBIZ+ X-Received: by 2002:a05:6a20:160b:b0:190:ce12:ecec with SMTP id l11-20020a056a20160b00b00190ce12ececmr743730pzj.74.1702297857607; Mon, 11 Dec 2023 04:30:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702297857; cv=none; d=google.com; s=arc-20160816; b=ZiZVs10pH9oVmjPLD1jf+QO1R0lX6FTRl3NNfE8njqIZGuiqppZByJfZXmLUNs087q 4l1fknKJbF5hDPztaXY83Mh96ly/sPcEjQHWRLVtYdx2O+mM7uTnNyoEqj+nOEO933T+ QxkP4w8sqNnMUTfPzYek5+rb42OcDjGS6JnPA2Ymytka0EgZH+eeMLw8JP0GQrO/L8K3 7Uy2q9tpCBIbrJOHXR3cIuIHtVUMucEx94Bq7AV4vjYARXyr58hg5wqmG2L+WH7jZY85 4ORATR8nJO/KCs0GOZRGTOZ1EGHtVxBlW1/1CXMgKPCaMygMoxOjm+0iehGPrslE6yQ4 Fz8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature:dkim-signature:dkim-signature; bh=pV78XzILgikwq9fxdiYEdF0PF3nysXH8O8vZMrG/+P0=; fh=pQfI/uuXKe14zlCrAFBH6Nq0mM6DLHUjxFAtTGNuXo8=; b=tDemYHv1HCPb2kGbtzjNco17AYz2aoPo//OggL+Fpls5GUKZOLT6C7kZ02A/IIyBNo VyGB4Z7UxSE/QRQyAomOiyjPVAQjGf37VSHmC6TrzuOb7b+kxJ27zuV682buQYafDamE E0vVHHCURCQ9OmBp138JRdnKhiQ1Cn4q2pcePEtxvk3q6PKMjOoD8NIri2b4iNtHP3I3 me4xFZoWkDHHRLwtQnjHq7UaLP56Idw6i76bVoWC+m5AcKV+W9VIELvH5nUVIk8x0REW J50PdnVudZ2hyAT8eMZvKFqfXMmGX64hWhFJcOx1VvUnNYlLFfNINbOsVW8edvPiF+7n GdVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=uSQ9GuT9; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=WlYGjskX; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=OOJzuaHa; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id y19-20020a056a00191300b006cddefd2031si5943886pfi.37.2023.12.11.04.30.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 04:30:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=uSQ9GuT9; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=WlYGjskX; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=OOJzuaHa; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 98C8080AC344; Mon, 11 Dec 2023 04:30:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234618AbjLKMaR (ORCPT + 99 others); Mon, 11 Dec 2023 07:30:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234652AbjLKMaO (ORCPT ); Mon, 11 Dec 2023 07:30:14 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F540101; Mon, 11 Dec 2023 04:30:20 -0800 (PST) Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E42451FB8A; Mon, 11 Dec 2023 12:30:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1702297818; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pV78XzILgikwq9fxdiYEdF0PF3nysXH8O8vZMrG/+P0=; b=uSQ9GuT9OV1qMWqEr5Jk27bRTbNJDxoDrmDMomPeMkSB1ToLPUvYnyC6oPxYKT54MrY2dR hPbblSXwWVc0TueJtj8S5dGOqAaEO2m71ZEEdyMscQfKxTSWBwj4AMBLNWEKnNoI8Vi1X6 CHBJdr/ZXUsVEzPghOVVFCBYMgWUcrU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1702297818; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pV78XzILgikwq9fxdiYEdF0PF3nysXH8O8vZMrG/+P0=; b=WlYGjskXnZHv3rmOSP3P0ZFcW4lu/7dwcr5k3rbnObRvPZIU5Lb4XIana9QVf3fzWGwk6/ 85YuEvPNPngoazDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1702297816; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pV78XzILgikwq9fxdiYEdF0PF3nysXH8O8vZMrG/+P0=; b=OOJzuaHayNm/cjYIFgcNZ80dtLxJDbDCGQQDrBesaDeeSTf22pOlILv4AgScPwQRP4i0yl vgu0k9Y8VdVmybHYQjhksmmamBKkGvu1c0qc4haS/jVBmFgWHf15FafzJdpX3Df+REzAQ4 BAiZzQOKK6cdGzsdaf9j+a5WliDyu7c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1702297816; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pV78XzILgikwq9fxdiYEdF0PF3nysXH8O8vZMrG/+P0=; b=6WZ11VbIXreZyDmns+xURE6vpolRTcYuydR0ADViB4/g+Lp76JGdz0+yVfvfJXR/S6AVWU DveKn1TQD9/20LAQ== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id D102A138FF; Mon, 11 Dec 2023 12:30:16 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id n9WxMtgAd2XlRQAAn2gu4w (envelope-from ); Mon, 11 Dec 2023 12:30:16 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 765A2A07E3; Mon, 11 Dec 2023 13:30:12 +0100 (CET) Date: Mon, 11 Dec 2023 13:30:12 +0100 From: Jan Kara To: Christophe JAILLET Cc: Alexander Viro , Christian Brauner , Jan Kara , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] eventfd: Remove usage of the deprecated ida_simple_xx() API Message-ID: <20231211123012.mrxfakg2wxdlsthb@quack3> References: <575dcecd51097dd30c5515f9f0ed92076b4ef403.1702229520.git.christophe.jaillet@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <575dcecd51097dd30c5515f9f0ed92076b4ef403.1702229520.git.christophe.jaillet@wanadoo.fr> X-Spam-Level: X-Spam-Score: -0.93 Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spam-Score: -0.93 X-Spamd-Result: default: False [-0.93 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[wanadoo.fr]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_SEVEN(0.00)[7]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email]; FREEMAIL_TO(0.00)[wanadoo.fr]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.13)[67.30%] 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 morse.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 (morse.vger.email [0.0.0.0]); Mon, 11 Dec 2023 04:30:37 -0800 (PST) On Sun 10-12-23 18:32:18, Christophe JAILLET wrote: > 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 Looks good. Feel free to add: Reviewed-by: Jan Kara Honza > --- > 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 > -- Jan Kara SUSE Labs, CR