Skip to content

Commit 95838bd

Browse files
committed
Merge tag 'block-5.12-2021-04-23' of git://git.kernel.dk/linux-block
Pull block fix from Jens Axboe: "A single fix for a behavioral regression in this series, when re-reading the partition table with partitions open" * tag 'block-5.12-2021-04-23' of git://git.kernel.dk/linux-block: block: return -EBUSY when there are open partitions in blkdev_reread_part
2 parents 6d1d45c + 68e6582 commit 95838bd

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

block/ioctl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ static int blkdev_reread_part(struct block_device *bdev, fmode_t mode)
8989
return -EINVAL;
9090
if (!capable(CAP_SYS_ADMIN))
9191
return -EACCES;
92+
if (bdev->bd_part_count)
93+
return -EBUSY;
9294

9395
/*
9496
* Reopen the device to revalidate the driver state and force a

0 commit comments

Comments
 (0)