• L
    Btrfs: fix possible deadlock when opening a seed device · b367e47f
    Li Zefan 提交于
    The correct lock order is uuid_mutex -> volume_mutex -> chunk_mutex,
    but when we mount a filesystem which has backing seed devices, we have
    this lock chain:
    
        open_ctree()
            lock(chunk_mutex);
            read_chunk_tree();
                read_one_dev();
                    open_seed_devices();
                        lock(uuid_mutex);
    
    and then we hit a lockdep splat.
    Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
    b367e47f
volumes.c 93.2 KB