Add a littler helper to make the somewhat arcane bd_contains checks a little more obvious.
Showing the changes to kernel (1 of 10 files). Show all
Unified · Split
| @@ -527,7 +527,7 @@ static int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev, · 526 unmodified lines | ||
| 527 | 527 | * and scsi-generic block devices we create a temporary new debugfs |
| 528 | 528 | * directory that will be removed once the trace ends. |
| 529 | 529 | */ |
| 530 | − if (bdev && bdev == bdev->bd_contains) | |
| 530 | + if (bdev && !bdev_is_partition(bdev)) | |
| 531 | 531 | dir = q->debugfs_dir; |
| 532 | 532 | else |
| 533 | 533 | bt->dir = dir = debugfs_create_dir(buts->name, blk_debugfs_root); |