Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dm: make sure create and remove dm device won't race with open and cl…
…ose table [ Upstream commit d563792 ] open_table_device() and close_table_device() is protected by table_devices_lock, hence use it to protect add_disk() and del_gendisk(). Prepare to track per-add_disk holder relations in dm. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Reviewed-by: Mike Snitzer <snitzer@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20221115141054.1051801-6-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Stable-dep-of: 1a581b7 ("dm: track per-add_disk holder relations in DM") Signed-off-by: Sasha Levin <sashal@kernel.org>
- Loading branch information