summaryrefslogtreecommitdiff
path: root/kernel/trace/blktrace.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-09-03 08:40:57 +0300
committerJens Axboe <axboe@kernel.dk>2020-09-25 17:18:57 +0300
commitfa01b1e9733fd59ecb8b5b6d85dfb481d2025fbf (patch)
treef627199fb47da3dc4fa57dcbf305fff12997a918 /kernel/trace/blktrace.c
parent250eec9e390e2be6f672f9a77cf29791c189f7da (diff)
downloadlinux-fa01b1e9733fd59ecb8b5b6d85dfb481d2025fbf.tar.xz
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/trace/blktrace.c')
-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);