Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f4f6d3c0 authored by Jan Kara's avatar Jan Kara Committed by Ritesh Harjani
Browse files

block: Fix bdi assignment to bdev inode when racing with disk delete



When disk->fops->open() in __blkdev_get() returns -ERESTARTSYS, we
restart the process of opening the block device. However we forget to
switch bdev->bd_bdi back to noop_backing_dev_info and as a result bdev
inode will be pointing to a stale bdi. Fix the problem by setting
bdev->bd_bdi later when __blkdev_get() is already guaranteed to succeed.

Acked-by: default avatarTejun Heo <tj@kernel.org>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
Change-Id: I6736ed1aba8732d3146284311c718f48b9c06578
Git-repo:
git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git


Git-commit: 03e262798884b0a5f948b17433afd80606cb3497
Signed-off-by: default avatarRitesh Harjani <riteshh@codeaurora.org>
parent 16d28918
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment