diff options
| author | Ingo Molnar <mingo@kernel.org> | 2020-03-21 09:35:44 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2020-03-21 09:35:44 +0100 |
| commit | df10846ff2ac3b0a7b295be2de2e9215877982f3 (patch) | |
| tree | 9e5ff5583aa1547afd3c577815af81c2f328e288 /include/linux/genhd.h | |
| parent | a4654e9bde4ecedb4921e6c8fe2088114bdff1b3 (diff) | |
| parent | 5ad0ec0b86525d0c5d3d250d3cfad7f183b00cfa (diff) | |
Merge branch 'linus' into locking/kcsan, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/genhd.h')
| -rw-r--r-- | include/linux/genhd.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 6fbe58538ad6..07dc91835b98 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -245,18 +245,6 @@ static inline bool disk_part_scan_enabled(struct gendisk *disk) !(disk->flags & GENHD_FL_NO_PART_SCAN); } -static inline bool disk_has_partitions(struct gendisk *disk) -{ - bool ret = false; - - rcu_read_lock(); - if (rcu_dereference(disk->part_tbl)->len > 1) - ret = true; - rcu_read_unlock(); - - return ret; -} - static inline dev_t disk_devt(struct gendisk *disk) { return MKDEV(disk->major, disk->first_minor); @@ -298,6 +286,7 @@ extern void disk_part_iter_exit(struct disk_part_iter *piter); extern struct hd_struct *disk_map_sector_rcu(struct gendisk *disk, sector_t sector); +bool disk_has_partitions(struct gendisk *disk); /* * Macros to operate on percpu disk statistics: |
