Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
block: loop: fix another reread part failure
loop_clr_fd() can be run piggyback with lo_release(), and under this situation, reread partition may always fail because bd_mutex has been held already. This patch detects the situation by the reference count, and call __blkdev_reread_part() to avoid acquiring the lock again. In the meantime, this patch switches to new kernel APIs of blkdev_reread_part() and __blkdev_reread_part(). Reviewed-by: Christoph Hellwig <[email protected]> Tested-by: Jarod Wilson <[email protected]> Acked-by: Jarod Wilson <[email protected]> Signed-off-by: Jarod Wilson <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
- Loading branch information