public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	linux-block@vger.kernel.org, linux-mmc@vger.kernel.org,
	linux-scsi@vger.kernel.org
Subject: [PATCH 07/14] block: remove the GENHD_FL_HIDDEN check in blkdev_get_no_open
Date: Mon, 22 Nov 2021 14:06:18 +0100	[thread overview]
Message-ID: <20211122130625.1136848-8-hch@lst.de> (raw)
In-Reply-To: <20211122130625.1136848-1-hch@lst.de>

Hidden gendisks never hash the block device inode, so this can't happen.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 block/bdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/block/bdev.c b/block/bdev.c
index cf29c6508bff2..ae063041f2910 100644
--- a/block/bdev.c
+++ b/block/bdev.c
@@ -753,8 +753,7 @@ struct block_device *blkdev_get_no_open(dev_t dev)
 
 	if (!bdev)
 		return NULL;
-	if ((bdev->bd_disk->flags & GENHD_FL_HIDDEN) ||
-	    !try_module_get(bdev->bd_disk->fops->owner)) {
+	if (!try_module_get(bdev->bd_disk->fops->owner)) {
 		put_device(&bdev->bd_device);
 		return NULL;
 	}
-- 
2.30.2


  parent reply	other threads:[~2021-11-22 13:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22 13:06 cleanup and simplify the gendisk flags Christoph Hellwig
2021-11-22 13:06 ` [PATCH 01/14] block: move GENHD_FL_NATIVE_CAPACITY to disk->state Christoph Hellwig
2021-11-22 13:06 ` [PATCH 02/14] block: move GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE to disk->event_flags Christoph Hellwig
2021-11-22 13:06 ` [PATCH 03/14] block: remove GENHD_FL_CD Christoph Hellwig
2021-11-22 13:06 ` [PATCH 04/14] block: remove a dead check in show_partition Christoph Hellwig
2021-11-22 13:06 ` [PATCH 05/14] block: merge disk_scan_partitions and blkdev_reread_part Christoph Hellwig
2021-11-22 13:06 ` [PATCH 06/14] block: rename GENHD_FL_NO_PART_SCAN to GENHD_FL_NO_PART Christoph Hellwig
2021-11-22 14:02   ` Ulf Hansson
2021-11-22 13:06 ` Christoph Hellwig [this message]
2021-11-22 13:06 ` [PATCH 08/14] null_blk: don't suppress partitioning information Christoph Hellwig
2021-11-22 13:06 ` [PATCH 09/14] mmc: don't set GENHD_FL_SUPPRESS_PARTITION_INFO Christoph Hellwig
2021-11-22 14:02   ` Ulf Hansson
2021-11-22 13:06 ` [PATCH 10/14] block: remove GENHD_FL_SUPPRESS_PARTITION_INFO Christoph Hellwig
2021-11-22 13:06 ` [PATCH 11/14] block: remove GENHD_FL_EXT_DEVT Christoph Hellwig
2022-05-25 14:35   ` Ming Lei
2022-05-25 16:51     ` Christoph Hellwig
2022-05-25 16:51       ` Christoph Hellwig
2022-05-26  3:06       ` Ming Lei
2022-05-26  9:08         ` Christoph Hellwig
2021-11-22 13:06 ` [PATCH 12/14] block: don't set GENHD_FL_NO_PART for hidden gendisks Christoph Hellwig
2021-11-22 13:06 ` [PATCH 13/14] block: cleanup the GENHD_FL_* definitions Christoph Hellwig
2021-11-22 13:06 ` [PATCH 14/14] sr: set GENHD_FL_REMOVABLE earlier Christoph Hellwig
2021-11-23 16:10 ` cleanup and simplify the gendisk flags Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211122130625.1136848-8-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox