block: reopen the device in blkdev_reread_part
stable inclusion from stable-5.10.20 commit cc88a819a14c2d2948090b6ddb2db2eee2904efb bugzilla: 50608 -------------------------------- [ Upstream commit 4601b4b1 ] Historically the BLKRRPART ioctls called into the now defunct ->revalidate method, which caused the sd driver to check if any media is present. When the ->revalidate method was removed this revalidation was lost, leading to lots of I/O errors when using the eject command. Fix this by reopening the device to rescan the partitions, and thus calling the revalidation logic in the sd driver. Fixes: 471bd0af ("sd: use bdev_check_media_change") Reported--by:Tom Seewald <tseewald@gmail.com> Signed-off-by:
Christoph Hellwig <hch@lst.de> Tested-by:
Tom Seewald <tseewald@gmail.com> Reviewed-by:
Ming Lei <ming.lei@redhat.com> Reviewed-by:
Minwoo Im <minwoo.im.dev@gmail.com> Signed-off-by:
Jens Axboe <axboe@kernel.dk> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Chen Jun <chenjun102@huawei.com> Acked-by:
Xie XiuQi <xiexiuqi@huawei.com> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com>
Loading
Please sign in to comment