summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-09-03 07:40:57 +0200
committerJens Axboe <axboe@kernel.dk>2020-09-25 16:18:57 +0200
commitfa01b1e9733fd59ecb8b5b6d85dfb481d2025fbf (patch)
treef627199fb47da3dc4fa57dcbf305fff12997a918 /drivers/md
parentDocumentation/hdio: fix up obscure bd_contains references (diff)
downloadlinux-fa01b1e9733fd59ecb8b5b6d85dfb481d2025fbf.tar.xz
linux-fa01b1e9733fd59ecb8b5b6d85dfb481d2025fbf.zip
block: add a bdev_is_partition helper
Add a littler helper to make the somewhat arcane bd_contains checks a little more obvious. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-table.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 405d7cf10eb9..12d909044c10 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -903,7 +903,7 @@ static int device_is_rq_stackable(struct dm_target *ti, struct dm_dev *dev,
struct request_queue *q = bdev_get_queue(bdev);
/* request-based cannot stack on partitions! */
- if (bdev != bdev->bd_contains)
+ if (bdev_is_partition(bdev))
return false;
return queue_is_mq(q);