diff options
author | Jan Kara <jack@suse.cz> | 2017-02-08 08:05:56 +0100 |
---|---|---|
committer | Ritesh Harjani <riteshh@codeaurora.org> | 2017-04-03 14:47:02 +0530 |
commit | 5d9a2c9e5e3176a35d1d82d82071b686aaaef62f (patch) | |
tree | fff7cc7886ea306985280e3915516457f8f9daa2 /drivers/gpu/msm/adreno_ringbuffer.c | |
parent | 44f5f07cfca714fa0d1b68a8f3d0f87d80a62074 (diff) |
block: Move bdi_unregister() to del_gendisk()
Commit 6cd18e711dd8 "block: destroy bdi before blockdev is
unregistered." moved bdi unregistration (at that time through
bdi_destroy()) from blk_release_queue() to blk_cleanup_queue() because
it needs to happen before blk_unregister_region() call in del_gendisk()
for MD. SCSI though will free up the device number from sd_remove()
called through a maze of callbacks from device_del() in
__scsi_remove_device() before blk_cleanup_queue() and thus similar races
as described in 6cd18e711dd8 can happen for SCSI as well as reported by
Omar [1].
Moving bdi_unregister() to del_gendisk() works for MD and fixes the
problem for SCSI since del_gendisk() gets called from sd_remove() before
freeing the device number.
This also makes device_add_disk() (calling bdi_register_owner()) more
symmetric with del_gendisk().
[1] http://marc.info/?l=linux-block&m=148554717109098&w=2
Tested-by: Lekshmi Pillai <lekshmicpillai@in.ibm.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Tested-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Git-commit: 165a5e22fafb127ecb5914e12e8c32a1f0d3f820
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
Change-Id: I006db1a645adffb79d6b2f46f5ccc94fa21dfd0a
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Diffstat (limited to 'drivers/gpu/msm/adreno_ringbuffer.c')
0 files changed, 0 insertions, 0 deletions