[PATCH 2/2] Revert "block: don't add or resize partition on the disk with GENHD_FL_NO_PART"

From: Gulam Mohamed
Date: Mon Nov 17 2025 - 12:43:36 EST


This reverts commit 1a721de8489fa559ff4471f73c58bb74ac5580d3.

Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Gulam Mohamed <gulam.mohamed@xxxxxxxxxx>
---
block/ioctl.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/block/ioctl.c b/block/ioctl.c
index d25b84441237..a260e39e56a4 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -20,8 +20,6 @@ static int blkpg_do_ioctl(struct block_device *bdev,
struct blkpg_partition p;
sector_t start, length;

- if (disk->flags & GENHD_FL_NO_PART)
- return -EINVAL;
if (!capable(CAP_SYS_ADMIN))
return -EACCES;
if (copy_from_user(&p, upart, sizeof(struct blkpg_partition)))
--
2.47.3