mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 08:02:56 +00:00
writeback: use RCU to protect bdi_list
Now that bdi_writeback_all() no longer handles integrity writeback, it doesn't have to block anymore. This means that we can switch bdi_list reader side protection to RCU. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
f11fcae840
commit
cfc4ba5365
4 changed files with 63 additions and 28 deletions
|
@ -868,16 +868,16 @@ static void bdi_writeback_all(struct writeback_control *wbc)
|
|||
|
||||
WARN_ON(wbc->sync_mode == WB_SYNC_ALL);
|
||||
|
||||
spin_lock(&bdi_lock);
|
||||
rcu_read_lock();
|
||||
|
||||
list_for_each_entry(bdi, &bdi_list, bdi_list) {
|
||||
list_for_each_entry_rcu(bdi, &bdi_list, bdi_list) {
|
||||
if (!bdi_has_dirty_io(bdi))
|
||||
continue;
|
||||
|
||||
bdi_alloc_queue_work(bdi, wbc);
|
||||
}
|
||||
|
||||
spin_unlock(&bdi_lock);
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue