Merge tag 'driver-core-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / block / ioctl.c
index ff241e6..8ba1ed8 100644 (file)
@@ -89,6 +89,8 @@ static int blkdev_reread_part(struct block_device *bdev, fmode_t mode)
                return -EINVAL;
        if (!capable(CAP_SYS_ADMIN))
                return -EACCES;
+       if (bdev->bd_part_count)
+               return -EBUSY;
 
        /*
         * Reopen the device to revalidate the driver state and force a