summaryrefslogtreecommitdiffstats
path: root/fs/fs-writeback.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-09-14 13:12:40 +0200
committerJens Axboe <jens.axboe@oracle.com>2009-09-16 15:18:51 +0200
commitcfc4ba5365449cb6b5c9f68d755a142f17da1e47 (patch)
tree08770de9bb0e658f2e65abd4d10187b3e9f6bb1b /fs/fs-writeback.c
parentf11fcae8401a3175f528e2f7917362645d570111 (diff)
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>
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r--fs/fs-writeback.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 14f06b45919..f8cd7a97f5b 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -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();
}
/*