aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page-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 /mm/page-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 'mm/page-writeback.c')
-rw-r--r--mm/page-writeback.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index abc648f5de00..12c3d843ce93 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -315,7 +315,7 @@ int bdi_set_min_ratio(struct backing_dev_info *bdi, unsigned int min_ratio)
315{ 315{
316 int ret = 0; 316 int ret = 0;
317 317
318 spin_lock(&bdi_lock); 318 spin_lock_bh(&bdi_lock);
319 if (min_ratio > bdi->max_ratio) { 319 if (min_ratio > bdi->max_ratio) {
320 ret = -EINVAL; 320 ret = -EINVAL;
321 } else { 321 } else {
@@ -327,7 +327,7 @@ int bdi_set_min_ratio(struct backing_dev_info *bdi, unsigned int min_ratio)
327 ret = -EINVAL; 327 ret = -EINVAL;
328 } 328 }
329 } 329 }
330 spin_unlock(&bdi_lock); 330 spin_unlock_bh(&bdi_lock);
331 331
332 return ret; 332 return ret;
333} 333}
@@ -339,14 +339,14 @@ int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned max_ratio)
339 if (max_ratio > 100) 339 if (max_ratio > 100)
340 return -EINVAL; 340 return -EINVAL;
341 341
342 spin_lock(&bdi_lock); 342 spin_lock_bh(&bdi_lock);
343 if (bdi->min_ratio > max_ratio) { 343 if (bdi->min_ratio > max_ratio) {
344 ret = -EINVAL; 344 ret = -EINVAL;
345 } else { 345 } else {
346 bdi->max_ratio = max_ratio; 346 bdi->max_ratio = max_ratio;
347 bdi->max_prop_frac = (PROP_FRAC_BASE * max_ratio) / 100; 347 bdi->max_prop_frac = (PROP_FRAC_BASE * max_ratio) / 100;
348 } 348 }
349 spin_unlock(&bdi_lock); 349 spin_unlock_bh(&bdi_lock);
350 350
351 return ret; 351 return ret;
352} 352}