aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fs-writeback.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-09-14 07:12:40 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-09-16 09:18:51 -0400
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 14f06b459197..f8cd7a97f5b7 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -868,16 +868,16 @@ static void bdi_writeback_all(struct writeback_control *wbc)
868 868
869 WARN_ON(wbc->sync_mode == WB_SYNC_ALL); 869 WARN_ON(wbc->sync_mode == WB_SYNC_ALL);
870 870
871 spin_lock(&bdi_lock); 871 rcu_read_lock();
872 872
873 list_for_each_entry(bdi, &bdi_list, bdi_list) { 873 list_for_each_entry_rcu(bdi, &bdi_list, bdi_list) {
874 if (!bdi_has_dirty_io(bdi)) 874 if (!bdi_has_dirty_io(bdi))
875 continue; 875 continue;
876 876
877 bdi_alloc_queue_work(bdi, wbc); 877 bdi_alloc_queue_work(bdi, wbc);
878 } 878 }
879 879
880 spin_unlock(&bdi_lock); 880 rcu_read_unlock();
881} 881}
882 882
883/* 883/*