@@ -6387,6 +6387,7 @@ static struct btrfs_block_group_cache *
btrfs_lock_cluster(struct btrfs_block_group_cache *block_group,
struct btrfs_free_cluster *cluster,
int delalloc)
+__acquires(&cluster->refill_lock)
{
struct btrfs_block_group_cache *used_bg;
bool locked = false;
@@ -4775,8 +4775,8 @@ static inline void btrfs_release_extent_buffer_rcu(struct rcu_head *head)
__free_extent_buffer(eb);
}
-/* Expects to have eb->eb_lock already held */
static int release_extent_buffer(struct extent_buffer *eb)
+__releases(&eb->refs_lock)
{
WARN_ON(atomic_read(&eb->refs) == 0);
if (atomic_dec_and_test(&eb->refs)) {
@@ -1838,6 +1838,7 @@ static struct btrfs_free_space_op free_space_op = {
static int insert_into_bitmap(struct btrfs_free_space_ctl *ctl,
struct btrfs_free_space *info)
+__must_hold(&ctl->tree_lock)
{
struct btrfs_free_space *bitmap_info;
struct btrfs_block_group_cache *block_group = NULL;
@@ -222,6 +222,7 @@ void btrfs_tree_read_unlock_blocking(struct extent_buffer *eb)
* blocking readers or writers
*/
void btrfs_tree_lock(struct extent_buffer *eb)
+__acquires(&eb->lock)
{
again:
wait_event(eb->read_lock_wq, atomic_read(&eb->blocking_readers) == 0);