Skip to content

Commit

Permalink
Btrfs: remove unused wait in btrfs_stripe_hash
Browse files Browse the repository at this point in the history
In fact nobody is waiting on @wait's waitqueue, it can be safely
removed.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Liu Bo authored and David Sterba committed Jan 22, 2018
1 parent 36f7894 commit 203e02d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion fs/btrfs/ctree.h
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,6 @@ enum btrfs_orphan_cleanup_state {
/* used by the raid56 code to lock stripes for read/modify/write */
struct btrfs_stripe_hash {
struct list_head hash_list;
wait_queue_head_t wait;
spinlock_t lock;
};

Expand Down
10 changes: 0 additions & 10 deletions fs/btrfs/raid56.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ int btrfs_alloc_stripe_hash_table(struct btrfs_fs_info *info)
cur = h + i;
INIT_LIST_HEAD(&cur->hash_list);
spin_lock_init(&cur->lock);
init_waitqueue_head(&cur->wait);
}

x = cmpxchg(&info->stripe_hash_table, NULL, table);
Expand Down Expand Up @@ -815,15 +814,6 @@ static noinline void unlock_stripe(struct btrfs_raid_bio *rbio)
}

goto done_nolock;
/*
* The barrier for this waitqueue_active is not needed,
* we're protected by h->lock and can't miss a wakeup.
*/
} else if (waitqueue_active(&h->wait)) {
spin_unlock(&rbio->bio_list_lock);
spin_unlock_irqrestore(&h->lock, flags);
wake_up(&h->wait);
goto done_nolock;
}
}
done:
Expand Down

0 comments on commit 203e02d

Please sign in to comment.