block: export blkdev_reread_part() and __blkdev_reread_part()

This patch exports blkdev_reread_part() for block drivers, also
introduce __blkdev_reread_part().

For some drivers, such as loop, reread of partitions can be run
from the release path, and bd_mutex may already be held prior to
calling ioctl_by_bdev(bdev, BLKRRPART, 0), so introduce
__blkdev_reread_part for use in such cases.

CC: Christoph Hellwig <>
CC: Jens Axboe <>
CC: Tejun Heo <>
CC: Alexander Viro <>
CC: Markus Pargmann <>
CC: Stefan Weinhuber <>
CC: Stefan Haberland <>
CC: Sebastian Ott <>
CC: Fabian Frederick <>
CC: Ming Lei <>
CC: David Herrmann <>
CC: Andrew Morton <>
CC: Peter Zijlstra <>
Reviewed-by: Christoph Hellwig <>
Signed-off-by: Jarod Wilson <>
Signed-off-by: Ming Lei <>
Signed-off-by: Jens Axboe <>
2 files changed