summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/genhd.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 74518c576fbb..0b9be3df9489 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -56,15 +56,15 @@ struct partition_meta_info {
* (``BLOCK_EXT_MAJOR``).
* This affects the maximum number of partitions.
*
- * ``GENHD_FL_NO_PART_SCAN`` (0x0200): partition scanning is disabled.
- * Used for loop devices in their default settings and some MMC
- * devices.
+ * ``GENHD_FL_NO_PART`` (0x0200): partition support is disabled.
+ * The kernel will not scan for partitions from add_disk, and users
+ * can't add partitions manually.
*
* ``GENHD_FL_HIDDEN`` (0x0400): the block device is hidden; it
* doesn't produce events, doesn't appear in sysfs, and doesn't have
* an associated ``bdev``.
* Implies ``GENHD_FL_SUPPRESS_PARTITION_INFO`` and
- * ``GENHD_FL_NO_PART_SCAN``.
+ * ``GENHD_FL_NO_PART``.
* Used for multipath devices.
*/
#define GENHD_FL_REMOVABLE 0x0001
@@ -72,7 +72,7 @@ struct partition_meta_info {
/* 4 is unused (used to be GENHD_FL_MEDIA_CHANGE_NOTIFY) */
#define GENHD_FL_SUPPRESS_PARTITION_INFO 0x0020
#define GENHD_FL_EXT_DEVT 0x0040
-#define GENHD_FL_NO_PART_SCAN 0x0200
+#define GENHD_FL_NO_PART 0x0200
#define GENHD_FL_HIDDEN 0x0400
enum {
@@ -180,8 +180,7 @@ static inline int disk_max_parts(struct gendisk *disk)
static inline bool disk_part_scan_enabled(struct gendisk *disk)
{
- return disk_max_parts(disk) > 1 &&
- !(disk->flags & GENHD_FL_NO_PART_SCAN);
+ return disk_max_parts(disk) > 1 && !(disk->flags & GENHD_FL_NO_PART);
}
static inline dev_t disk_devt(struct gendisk *disk)