From patchwork Wed Nov 1 10:49:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 160514 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:abcd:0:b0:403:3b70:6f57 with SMTP id f13csp324201vqx; Wed, 1 Nov 2023 03:50:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFxNIf46ATTfdwlkV6+l/hRr3CsbMQryhgEAVbAfyI3DV0fhH7UcateLtVwdao/uy69qKty X-Received: by 2002:a05:6358:2608:b0:168:ef9b:6c0d with SMTP id l8-20020a056358260800b00168ef9b6c0dmr17351782rwc.32.1698835852925; Wed, 01 Nov 2023 03:50:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698835852; cv=none; d=google.com; s=arc-20160816; b=lFEv54UGtxcyt3pLiifiH/5iijca2nmjnklBJxeuQFBrIhLaVfVBNuLNcD6fAVMQRX KZmZkKNIlIf0ACgazI7lU8F0sPAMFXradEaY04W8itxsT7ih+oZDywjUoXt4RtpCjvkv VOGpCfBUV+IrEAbf34nYPyzW3CogtXndrRnaJwsmbxygFqzUewqkhltEu+3w9GWTHQ7R SqijEITIuMinPituQmQpft6i+fhF/SODrK288oTjrIUimwpgUV6o1ZhdmXWS1dzpsLOV dVuYaAH3zMw67UZYSmWlGACbA/6/qv3PbPRDbfNDIOuMNSNMlaakyRT8OyYJQfieTlvv 5iWQ== 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 :dkim-signature; bh=ZFoT46jhWC+OotEkeda4BBrZIJT+3NpRAKetJm3pBjI=; fh=4Bv4gkrilhJH6n8xnys1yoYkUyKweK2p2QXtbgH3QI0=; b=1Bs/C7whED76Mh9ub8N5h1jQbgnIH8ic2M1GyreDcpBADEMtahnLYR7xyCF5uOwKTQ zXvhgLoyrbbmnR1WMDGkJMa7n0BzIFMiOw7L+oHJrdoZ4BI4xCEN3+zCPUkN2dv+fZxJ X6jPrHyr0L5zdYF+xqXmgLDyh1EUtiJMf06NbOYsloyW04MHNbO4YQCF3TSgatTbQ5IA QKDDrd9pFBFUiU+qx3QYyBEGKa/2Iq7nJB0HQngrVUysKCIsx/MOz8wrXeRBfBHsuBvk c58iuFZqAxNDulfOnL/MceO6eNgFpXCItLG2YO2dqH6L7as7GFpzdHnP9dlwbwOwZfwl 9CeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=E8ypWe7Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id bq19-20020a056a02045300b005b928e39429si2906268pgb.259.2023.11.01.03.50.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 03:50:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=E8ypWe7Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 4978E8078E32; Wed, 1 Nov 2023 03:50:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232058AbjKAKuH (ORCPT + 35 others); Wed, 1 Nov 2023 06:50:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232230AbjKAKuD (ORCPT ); Wed, 1 Nov 2023 06:50:03 -0400 Received: from smtp.smtpout.orange.fr (smtp-25.smtpout.orange.fr [80.12.242.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C17EE8 for ; Wed, 1 Nov 2023 03:49:59 -0700 (PDT) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id y8nGq7z314QsMy8nNquUNu; Wed, 01 Nov 2023 11:49:58 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1698835798; bh=ZFoT46jhWC+OotEkeda4BBrZIJT+3NpRAKetJm3pBjI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=E8ypWe7QgSH/1hVNdu7NjKwR6dgkPxmlT6wOrOuy+qIK8qWSkzW/in+i1zDWc9/eu sdH7yEEQTPrkmlVN7ZjOA4DONg64WFIS8EFuXXmM732OOb6S3MHo9fxxmQVnca+eR9 aX/AIA9S2BaUtXguHsf4hqAn9ArijpRLukoYpS0OnvyAsBQYAY5O32aU/nGU6DOQWD N/5B1xKkyjd/ToWslTf2CcI+xF9JiwgGjz5mIMYBzAa5Ux18Tg6J9O70Z3aZCfKWci IqtBFU07TJKh4AZ9mmpruRlQFtzx+TLpIEw8fbIe1g+XHoT07GN88kC+36ocS9iRBz VHbrGWbtQfNIQ== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Wed, 01 Nov 2023 11:49:58 +0100 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Hans de Goede Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-fsdevel@vger.kernel.org Subject: [PATCH 2/2] vboxsf: Remove usage of the deprecated ida_simple_xx() API Date: Wed, 1 Nov 2023 11:49:49 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 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 pete.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 (pete.vger.email [0.0.0.0]); Wed, 01 Nov 2023 03:50:17 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781358503677766724 X-GMAIL-MSGID: 1781358503677766724 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/vboxsf/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/vboxsf/super.c b/fs/vboxsf/super.c index 9848af78215b..0f67f2d8b651 100644 --- a/fs/vboxsf/super.c +++ b/fs/vboxsf/super.c @@ -155,7 +155,7 @@ static int vboxsf_fill_super(struct super_block *sb, struct fs_context *fc) } } - sbi->bdi_id = ida_simple_get(&vboxsf_bdi_ida, 0, 0, GFP_KERNEL); + sbi->bdi_id = ida_alloc(&vboxsf_bdi_ida, GFP_KERNEL); if (sbi->bdi_id < 0) { err = sbi->bdi_id; goto fail_free; @@ -221,7 +221,7 @@ static int vboxsf_fill_super(struct super_block *sb, struct fs_context *fc) vboxsf_unmap_folder(sbi->root); fail_free: if (sbi->bdi_id >= 0) - ida_simple_remove(&vboxsf_bdi_ida, sbi->bdi_id); + ida_free(&vboxsf_bdi_ida, sbi->bdi_id); if (sbi->nls) unload_nls(sbi->nls); fail_destroy_idr: @@ -269,7 +269,7 @@ static void vboxsf_put_super(struct super_block *sb) vboxsf_unmap_folder(sbi->root); if (sbi->bdi_id >= 0) - ida_simple_remove(&vboxsf_bdi_ida, sbi->bdi_id); + ida_free(&vboxsf_bdi_ida, sbi->bdi_id); if (sbi->nls) unload_nls(sbi->nls);