History

block: add a bdev_is_partition helper

Add a littler helper to make the somewhat arcane bd_contains checks a little more obvious.

Christoph Hellwig committed 6 years ago

Commit fa01b1e1 parent 250eec910 files · +22 −17Browse files

Showing the changes to kernel (1 of 10 files). Show all

Unified · Split

kernel/trace/blktrace.c+1−1
@@ -527,7 +527,7 @@ static int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev, · 526 unmodified lines
527 * and scsi-generic block devices we create a temporary new debugfs527 * and scsi-generic block devices we create a temporary new debugfs
528 * directory that will be removed once the trace ends.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 dir = q->debugfs_dir;531 dir = q->debugfs_dir;
532 else532 else
533 bt->dir = dir = debugfs_create_dir(buts->name, blk_debugfs_root);533 bt->dir = dir = debugfs_create_dir(buts->name, blk_debugfs_root);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t