Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp288632rdh; Mon, 18 Dec 2023 21:17:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IGLpvXe2Wjv0kWUY3kyhpzZjEiFMWecw5VRxJURYZrBUSrR7ATmPyLSDoHlBiiUVm5MPybr X-Received: by 2002:a05:6359:4583:b0:172:da2e:cb13 with SMTP id no3-20020a056359458300b00172da2ecb13mr2484636rwb.39.1702963047084; Mon, 18 Dec 2023 21:17:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702963047; cv=none; d=google.com; s=arc-20160816; b=sOgEgeno46/g8fnmXBd03ZXOVXiCQewJRquWe6PtVoaSF1i+6H0Gqpi85eMuXxMMIX 9PXYSuhzz1SCd5tFQS6FyPIs7yu4gx6RrWTVQHjx57bVqQ3kmZXNCjeTcljuFOvFgIGi 9nMwi86u7EhlIEXY2G2357DsQFfwh1K+fZeuqvt3LYiu5MkTadZ8ghR+N64bdtbLJyPp ImlxovolWpT04tRXu4DocYCLRdMK+K8taUZ76RKek3KOnWrLnINA/q5lGIzfYQUENMS6 IUZQRNFeIjATfFdlFw9q8NP0V2mxhaA+5jeaO20fKl4I3o6ZgBsor1mkdxZxVZSBWtXG R6Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=QDDqKuTgraiQIw4koE+NaTIronTlA6Us494Q0sE/Agw=; fh=4Bv4gkrilhJH6n8xnys1yoYkUyKweK2p2QXtbgH3QI0=; b=u+/pd73qWoCic+j5dnZgukLnQkWZYXrdqL9BSXOp21mZdzMqVJWh7OuIEdzt+NY3Xr 8BHSkEd+ds23YW3uzsBdegqu0RQ+FGXgIsp3bvJEB9bDPokTdF32bOrhVnkq3TSx+R+P 7Wao6G95l9vcaP59ACKg6q28FWMlo+hY5EJOknFLqkY12V1Nv9+nA9sAI0eXFff3FjwW y1ItpLs5KKV3GJ6kZXFRDSFPpe46A+7apwGSZ7eTj2sa6pkuxlWLpiVylCSflE9ITilU SjzPZAuG87nqps/+Ex8nI4I4JdBEgSBxBqGGeWusSAasbxJBxBhWVBpTXZkIODprrflw m3xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=gXpkr7t5; spf=pass (google.com: domain of linux-kernel+bounces-4708-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4708-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 20-20020a170902e9d400b001d3adee1135si3547853plk.249.2023.12.18.21.17.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 21:17:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4708-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=gXpkr7t5; spf=pass (google.com: domain of linux-kernel+bounces-4708-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4708-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A75E728599F for ; Tue, 19 Dec 2023 05:17:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 93E3D6D24; Tue, 19 Dec 2023 05:17:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="gXpkr7t5" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.smtpout.orange.fr (smtp-23.smtpout.orange.fr [80.12.242.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A489C12B8F for ; Tue, 19 Dec 2023 05:17:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Received: from pop-os.home ([92.140.202.140]) by smtp.orange.fr with ESMTPA id FSTZrpnVkgRU5FSTar0C39; Tue, 19 Dec 2023 06:17:06 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1702963026; bh=QDDqKuTgraiQIw4koE+NaTIronTlA6Us494Q0sE/Agw=; h=From:To:Cc:Subject:Date; b=gXpkr7t5CfyXPM/SNEMlNBMsMOjtgoNDPKQKPa9f7Brvamv7+CQVTfMTkK1XR1lXw G5dXkpm55H7nuRmJQpZBF+dYWmrxVbVuO7f1ot/V8llN34yYei9qzzmV8pmlrEE0q8 1QXoHKtvT2U6V8tnDqUZoBMqEdd/xslrkb3sdRxau9jtQHpyODcS+t4qdiJprOXAsE JHJ6ffV631b85Kd6A7mUlLuR/q4KqHZOBlj6knstnh7D5FPhKLUpl9OjA8StC3D9Bk P6aDXr8pz6qJTtuDF0qDpagDCvUJb2DLmVRa8DFat4LWZ/DYaYINVyks1jc9XB2Wha n7v+nVJHlIu2Q== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 19 Dec 2023 06:17:06 +0100 X-ME-IP: 92.140.202.140 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] vboxsf: Remove usage of the deprecated ida_simple_xx() API Date: Tue, 19 Dec 2023 06:17:04 +0100 Message-Id: <2752888783edaed8576777e1763dc0489fd07000.1702963000.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 1fb8f4df60cb..cd8486bc91bd 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); idr_destroy(&sbi->ino_idr); @@ -268,7 +268,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); -- 2.34.1