Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3550667pxv; Mon, 19 Jul 2021 03:03:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoAfImaZabggaG/oBQqBSP+1CaMoVu9WzJBfpVFNX+OqY+3nlW20rbGMda8ngYkXtSV8z5 X-Received: by 2002:a05:6402:d7:: with SMTP id i23mr33232012edu.291.1626689017655; Mon, 19 Jul 2021 03:03:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626689017; cv=none; d=google.com; s=arc-20160816; b=oX15QgTqXKAABDZ0P/5Hvb7Bat4bOAmwL8FRjElBhAzTNnC5KI5jKIXUBiBt7FYgWc BFRqiuTO1sltnT9x8w8F2CRcSKK0Ws1bZooLcW14GIPhUhqryxBg8INqNHFRl++6ERMs A3ZlIXTo8j+cE7KyNeu6jUWIITVRTJnuItWoUSV7CSa+bSWEnKP5tniTT6Wt3UWdQ8g3 Z4mJvdqx2f37DgZFq0jwQyZn8eK9jyFRam30Gj80defV0IzzMlCfujq/BAJhz6YWJieo ziGZfCl9zclSLaleaXsbopT8R3ZG1bWsaIqocO3QSL7Xx7H6lwS5j252GfO01lPWEy3J fuuw== 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; bh=YVs2GIIi3Paq5oNd8Q8z9Lu8YkdoWQ/5Ixo+pWJmJiQ=; b=hlBOg/sG3RAPZbzaATjbftx2KhY2n8RM+8rrvCMn5lYdcnK1HD8JaBf3JnvoWmGU9S vW9EPxoJMJr7vlzByvX74OWSfP2veoiRSZKTpXt0eTQqT9rOfyCpVq2oLBUEA9taTI6J 58youonb0lzEAkTjqhXOUniN2/CDwLUGQ2uua6OrLmGI9N0Mm6rcsJBaYQjpjHSZ4TbP woUogSE2Ax6PR1/4LSkpJyM7BdBvHHjCOPtAiVSKv9AzppRx5rvK+OoTHGQq14UyIcrh +7fdIMGggKYzFuzLki0eEJr/vXR7MQsw1GymfN+9yeqm45cGD2Ul96NdXNj3GHLCUAQU vZAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=jol4tTxj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h4si8858682ejx.303.2021.07.19.03.03.15; Mon, 19 Jul 2021 03:03:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=jol4tTxj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235975AbhGSJVh (ORCPT + 99 others); Mon, 19 Jul 2021 05:21:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235172AbhGSJVg (ORCPT ); Mon, 19 Jul 2021 05:21:36 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 145E9C061574; Mon, 19 Jul 2021 02:06:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=YVs2GIIi3Paq5oNd8Q8z9Lu8YkdoWQ/5Ixo+pWJmJiQ=; b=jol4tTxjmOGqVYhMczY9/NFA5c i5fmx7UIJP/zxc1Ydp+fTvSrToHEpY+cPQoRzdQHUTH7UaXR4w8Q5jumijeaO4cbIDyC11zFZfnQ8 WHq+6AxSOlbzXIhq4m1k3gBg5NQSH/PLy8ThU+ZtQrcYCZ87aWRlFCPXARjHxqGU3BjNrxKFxNGQH B8S5/JR34FpYgs19J4Wp5t1JS8EMNxFEj8gfsprHN1TGn4qeiV9+ZUPa6KtWfUaatM7hkm3eO6t9P 3nJtaovRwxY72UvTPBXlWwianC0bqPPlWpcX0qARziiQiO8vraoZRKVmAMNMPDcYXJbsqU6Vnzdeo prPPgptQ==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5Q4i-006j9y-35; Mon, 19 Jul 2021 10:00:57 +0000 Date: Mon, 19 Jul 2021 11:00:36 +0100 From: Christoph Hellwig To: Luis Chamberlain Cc: axboe@kernel.dk, hare@suse.de, bvanassche@acm.org, ming.lei@redhat.com, hch@infradead.org, jack@suse.cz, osandov@fb.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC 2/6] block: add flag for add_disk() completion notation Message-ID: References: <20210715202341.2016612-1-mcgrof@kernel.org> <20210715202341.2016612-3-mcgrof@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210715202341.2016612-3-mcgrof@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > { > might_sleep(); > > + if (!blk_disk_registered(disk)) > + return; > + Can't say I like this all that much. Drivers should keep some basic sanity for their unregister path, and while blk_disk_registered can be useful, it's uses should be kept at a minimum.