Message ID | 20230531125535.676098-19-hch@lst.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2876885vqr; Wed, 31 May 2023 06:23:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7VX6vi5eQejYxfRaxLOyT4w6Nyvp/IVd3xUmL22n2qPyObBvqqIXU5MFj4GDbEkbOAVFcm X-Received: by 2002:a05:6a00:1aca:b0:64d:1d84:aeb4 with SMTP id f10-20020a056a001aca00b0064d1d84aeb4mr5689494pfv.24.1685539398009; Wed, 31 May 2023 06:23:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685539397; cv=none; d=google.com; s=arc-20160816; b=y9+dwf0oFqxslB2fJhIogBRxz0gFjyEHiqarrFVhtsi0VRCm/Ei+YI0gVmYb1z9PcF rYhAHQjsgsH6CycwLEVPk0QDurSnGdfklySt8vBP5bDbcqei2z+SUn5dN0wEMP8f8puA AcqkYqFZCu8dm9iSsFkxgi/K8s+PvouScX+KNY0CzMGQlnciBiphnj7MgM2yQSYtzXLV ALPbLZYZZxB43umbKKFVE7gRa6+hxr2NZY9Q84ahwMlcWT2UZknlu3IrJ1bx3y6AzVmv 0/L5LePaGp8kt3PC3mlqewuwoIQm5aiC7fnAhK5qaUBkBFyovnDhMEkuc+ejxOEIPeHy qYHg== 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=0pt+DIUM7skHyOVxJn54kg489hpHIHXBxJn7U5ufVIU=; b=xv94feP66HVs7DCeiX6Qu+fRT24fqPaQ/f+OsdT1/jWPO52pZsoZLGR/WIkNvDOXao qe+Ro5ShGR1ePdbpSQnbYrM/ZkbqARM+ngx+wr9kUWYdKFQvGM8wm8CryK02ov5zePkh 9whJZN6A2AcYTJdf2sU6IRd4XInUL/nkRm+PKAw+eEuUqGZEzUY5ooXNsObX3j+Nw14o ycbztaBMXLN3X4tWaHeETEO077sTV76vAArh6v0HwujiqUmlWAgfkQb/YDdMfK2iGYWA 3kRzI0xYocYatobr4c4So2zdFZKVzs1zhxcp0L/tHX46iYFyaSJc/TXayIcCxckSelXY fkQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=kUC4YE7P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a134-20020a621a8c000000b0064cf289a327si1613250pfa.129.2023.05.31.06.23.05; Wed, 31 May 2023 06:23:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=kUC4YE7P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236292AbjEaM7E (ORCPT <rfc822;andrewvogler123@gmail.com> + 99 others); Wed, 31 May 2023 08:59:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232992AbjEaM6l (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 31 May 2023 08:58:41 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 724EA10E3; Wed, 31 May 2023 05:57:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=0pt+DIUM7skHyOVxJn54kg489hpHIHXBxJn7U5ufVIU=; b=kUC4YE7Po/pjH2Q/Qcg8UL5MQ6 pCOBpPjwrVIpg3lgqFvt0QoUH6zy231OYy6ksV61zFpCWXRA4nUivc41QWmesaOQbeMhEz/J6hlJb hxp4wRWlFTJ4q+a0uHGASZSfvu8HoeSrIlXiDvTBswYlsjzsnoiKp05FKuirzHEKMXKK0RZnwfk3n VIPMZXYmv6j+rzLarrB6HSm28fT8S1cMlMXrfvz6Na5QGqjiPe96ijeLsaEU+Hl+QPNUj68LSf0xU X7l0LoU3PzH4NY/I9aPfLlpxV7ylyiMlldi3Ig2BXrsUyHcab25flqJ9mnIvt8ZKpX0kHTEaJxU8V sohkPdSA==; Received: from [2001:4bb8:182:6d06:2e49:a56:513a:92ee] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1q4LO6-00HRx9-1J; Wed, 31 May 2023 12:57:14 +0000 From: Christoph Hellwig <hch@lst.de> To: Jens Axboe <axboe@kernel.dk> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "Rafael J. Wysocki" <rafael@kernel.org>, Mike Snitzer <snitzer@kernel.org>, Joern Engel <joern@lazybastard.org>, Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com>, Pavel Machek <pavel@ucw.cz>, Loic Poulain <loic.poulain@linaro.org>, dm-devel@redhat.com, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-mtd@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH 18/24] dm: open code dm_get_dev_t in dm_init_init Date: Wed, 31 May 2023 14:55:29 +0200 Message-Id: <20230531125535.676098-19-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230531125535.676098-1-hch@lst.de> References: <20230531125535.676098-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from <hch@infradead.org> by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767416159703241670?= X-GMAIL-MSGID: =?utf-8?q?1767416159703241670?= |
Series |
[01/24] driver core: return bool from driver_probe_done
|
|
Commit Message
Christoph Hellwig
May 31, 2023, 12:55 p.m. UTC
dm_init_init is called from early boot code, and thus lookup_bdev will never succeed. Just open code that call to early_lookup_bdev instead. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Snitzer <snitzer@kernel.org> --- drivers/md/dm-init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/md/dm-init.c b/drivers/md/dm-init.c index d369457dbed0ed..2a71bcdba92d14 100644 --- a/drivers/md/dm-init.c +++ b/drivers/md/dm-init.c @@ -293,8 +293,10 @@ static int __init dm_init_init(void) for (i = 0; i < ARRAY_SIZE(waitfor); i++) { if (waitfor[i]) { + dev_t dev; + DMINFO("waiting for device %s ...", waitfor[i]); - while (!dm_get_dev_t(waitfor[i])) + while (early_lookup_bdev(waitfor[i], &dev)) fsleep(5000); } }