]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
block: add a disk_has_partscan helper
authorChristoph Hellwig <hch@lst.de>
Thu, 2 May 2024 13:00:32 +0000 (15:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 May 2024 14:28:40 +0000 (16:28 +0200)
commit0f40eb57741a6f48ecd91585fce375562239459a
treee2891ab7874dcaaa654ab4ac14e4fba5d893d654
parenteb7561517b07bd7b447e12f3afb95f96878e0cb1
block: add a disk_has_partscan helper

commit 140ce28dd3bee8e53acc27f123ae474d69ef66f0 upstream.

Add a helper to check if partition scanning is enabled instead of
open coding the check in a few places.  This now always checks for
the hidden flag even if all but one of the callers are never reachable
for hidden gendisks.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20240502130033.1958492-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/genhd.c
block/partitions/core.c
include/linux/blkdev.h