diff options
author | Jan Kara <jack@suse.cz> | 2017-03-23 03:36:53 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-03-23 05:11:22 +0300 |
commit | 03e262798884b0a5f948b17433afd80606cb3497 (patch) | |
tree | 6f173a691e73dfdd8ba35c08269ff793277d2df8 /mm/backing-dev.c | |
parent | a83b576c9c25cf771fb0b15ec5eb2e7510ec2f5a (diff) | |
download | linux-03e262798884b0a5f948b17433afd80606cb3497.tar.xz |
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: Tejun Heo <tj@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'mm/backing-dev.c')
0 files changed, 0 insertions, 0 deletions