• Christoph Hellwig's avatar
    xfs: remove the ->kill_root btree operation · c0e59e1a
    Christoph Hellwig authored
    The implementation os ->kill_root only differ by either simply
    zeroing out the now unused buffer in the btree cursor in the inode
    allocation btree or using xfs_btree_setbuf in the allocation btree.
    
    Initially both of them used xfs_btree_setbuf, but the use in the
    ialloc btree was removed early on because it interacted badly with
    xfs_trans_binval.
    
    In addition to zeroing out the buffer in the cursor xfs_btree_setbuf
    updates the bc_ra array in the btree cursor, and calls
    xfs_trans_brelse on the buffer previous occupying the slot.
    
    The bc_ra update should be done for the alloc btree updated too,
    although the lack of it does not cause serious problems.  The
    xfs_trans_brelse call on the other hand is effectively a no-op in
    the end - it keeps decrementing the bli_recur refcount until it hits
    zero, and then just skips out because the buffer will always be
    dirty at this point.  So removing it for the allocation btree is
    just fine.
    
    So unify the code and move it to xfs_b...
    c0e59e1a
xfs_ialloc_btree.c 7.9 KB