aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorChristoph Hellwig2020-09-03 07:40:57 +0200
committerJens Axboe2020-09-25 08:18:57 -0600
commitfa01b1e9733fd59ecb8b5b6d85dfb481d2025fbf (patch)
treef627199fb47da3dc4fa57dcbf305fff12997a918 /kernel
parent250eec9e390e2be6f672f9a77cf29791c189f7da (diff)
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 'kernel')
-rw-r--r--kernel/trace/blktrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index c0887f32f647..ec874ea04092 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -527,7 +527,7 @@ static int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
* and scsi-generic block devices we create a temporary new debugfs
* directory that will be removed once the trace ends.
*/
- if (bdev && bdev == bdev->bd_contains)
+ if (bdev && !bdev_is_partition(bdev))
dir = q->debugfs_dir;
else
bt->dir = dir = debugfs_create_dir(buts->name, blk_debugfs_root);