• Kent Overstreet's avatar
    bcachefs: Fix a deadlock · 515282ac
    Kent Overstreet authored
    __bch2_btree_node_lock() was incorrectly using iter->pos as a proxy for
    btree node lock ordering, this caused an off by one error that was
    triggered by bch2_btree_node_get_sibling() getting the previous node.
    
    This refactors the code to compare against btree node keys directly.
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    515282ac
btree_locking.h 6.49 KB