• Josef Bacik's avatar
    btrfs: rename extent_buffer::lock_nested to extent_buffer::lock_recursed · 329ced79
    Josef Bacik authored
    Nested locking with lockdep and everything else refers to lock hierarchy
    within the same lock map.  This is how we indicate the same locks for
    different objects are ok to take in a specific order, for our use case
    that would be to take the lock on a leaf and then take a lock on an
    adjacent leaf.
    
    What ->lock_nested _actually_ refers to is if we happen to already be
    holding the write lock on the extent buffer and we're allowing a read
    lock to be taken on that extent buffer, which is recursion.  Rename this
    so we don't get confused when we switch to a rwsem and have to start
    using the _nested helpers.
    Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    329ced79
locking.c 17.9 KB