mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-01 11:21:51 +00:00
btrfs: comment waitqueue_active implied by locks
Suggested-by: Chris Mason <clm@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
b666a9cd99
commit
33a9eca7e4
2 changed files with 11 additions and 1 deletions
|
@ -810,6 +810,10 @@ static noinline void unlock_stripe(struct btrfs_raid_bio *rbio)
|
||||||
}
|
}
|
||||||
|
|
||||||
goto done_nolock;
|
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)) {
|
} else if (waitqueue_active(&h->wait)) {
|
||||||
spin_unlock(&rbio->bio_list_lock);
|
spin_unlock(&rbio->bio_list_lock);
|
||||||
spin_unlock_irqrestore(&h->lock, flags);
|
spin_unlock_irqrestore(&h->lock, flags);
|
||||||
|
|
|
@ -2950,6 +2950,9 @@ out_wake_log_root:
|
||||||
atomic_set(&log_root_tree->log_commit[index2], 0);
|
atomic_set(&log_root_tree->log_commit[index2], 0);
|
||||||
mutex_unlock(&log_root_tree->log_mutex);
|
mutex_unlock(&log_root_tree->log_mutex);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The barrier before waitqueue_active is implied by mutex_unlock
|
||||||
|
*/
|
||||||
if (waitqueue_active(&log_root_tree->log_commit_wait[index2]))
|
if (waitqueue_active(&log_root_tree->log_commit_wait[index2]))
|
||||||
wake_up(&log_root_tree->log_commit_wait[index2]);
|
wake_up(&log_root_tree->log_commit_wait[index2]);
|
||||||
out:
|
out:
|
||||||
|
@ -2961,6 +2964,9 @@ out:
|
||||||
atomic_set(&root->log_commit[index1], 0);
|
atomic_set(&root->log_commit[index1], 0);
|
||||||
mutex_unlock(&root->log_mutex);
|
mutex_unlock(&root->log_mutex);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The barrier before waitqueue_active is implied by mutex_unlock
|
||||||
|
*/
|
||||||
if (waitqueue_active(&root->log_commit_wait[index1]))
|
if (waitqueue_active(&root->log_commit_wait[index1]))
|
||||||
wake_up(&root->log_commit_wait[index1]);
|
wake_up(&root->log_commit_wait[index1]);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue