aboutsummaryrefslogtreecommitdiffstats
path: root/block/ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/ioctl.c')
-rw-r--r--block/ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/ioctl.c b/block/ioctl.c
index 555440337463..ca939fc1030f 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -102,7 +102,7 @@ static int blkdev_reread_part(struct block_device *bdev)
102 struct gendisk *disk = bdev->bd_disk; 102 struct gendisk *disk = bdev->bd_disk;
103 int res; 103 int res;
104 104
105 if (!disk_partitionable(disk) || bdev != bdev->bd_contains) 105 if (!disk_part_scan_enabled(disk) || bdev != bdev->bd_contains)
106 return -EINVAL; 106 return -EINVAL;
107 if (!capable(CAP_SYS_ADMIN)) 107 if (!capable(CAP_SYS_ADMIN))
108 return -EACCES; 108 return -EACCES;