diff options
author | 2021-04-23 14:46:20 -0700 | |
---|---|---|
committer | 2021-04-23 14:46:20 -0700 | |
commit | 95838bd9fcfaa12452dc9fd6d6920faef6bb5a46 (patch) | |
tree | 46035e354304a30bee3baa8852a1ac5e6ea8e7d6 | |
parent | Merge tag 'arm-fixes-5.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc (diff) | |
parent | block: return -EBUSY when there are open partitions in blkdev_reread_part (diff) | |
download | wireguard-linux-95838bd9fcfaa12452dc9fd6d6920faef6bb5a46.tar.xz wireguard-linux-95838bd9fcfaa12452dc9fd6d6920faef6bb5a46.zip |
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
Diffstat (limited to '')
-rw-r--r-- | block/ioctl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/ioctl.c b/block/ioctl.c index ff241e663c01..8ba1ed8defd0 100644 --- a/block/ioctl.c +++ b/block/ioctl.c @@ -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 |