• Keith Busch's avatar
    NVMe: Fix filesystem sync deadlock on removal · 302c6727
    Keith Busch authored
    This changes the order of deleting the gendisks so it happens after the
    nvme IO queues are freed. If a device is removed while a filesystem has
    associated dirty data, the removal will wait on these to complete before
    proceeding from del_gendisk, which could have caused deadlock before.
    
    The implication of this is that an orderly removal of a responsive
    device won't necessarily wait for dirty data to be written, but we are
    not guaranteed the device is even going to respond at this point either.
    Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
    Signed-off-by: default avatarMatthew Wilcox <matthew.r.wilcox@intel.com>
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    302c6727
nvme-core.c 75.9 KB