]> git.baikalelectronics.ru Git - kernel.git/commit
block: return -EBUSY when there are open partitions in blkdev_reread_part
authorChristoph Hellwig <hch@lst.de>
Wed, 21 Apr 2021 16:05:02 +0000 (18:05 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 21 Apr 2021 16:49:37 +0000 (10:49 -0600)
commit45c304e524aed61a5534232dd722c849c85ecd29
tree3cc6a5e8e60a81f969cb33215d221328a3483a57
parent4e040b04f0d58fb72c7034233ae39fb01aa6086d
block: return -EBUSY when there are open partitions in blkdev_reread_part

The switch to go through blkdev_get_by_dev means we now ignore the
return value from bdev_disk_changed in __blkdev_get.  Add a manual
check to restore the old semantics.

Fixes: 89cbb96206b2 ("block: reopen the device in blkdev_reread_part")
Reported-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210421160502.447418-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/ioctl.c