aboutsummaryrefslogtreecommitdiffstats
path: root/mm/backing-dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/backing-dev.c')
-rw-r--r--mm/backing-dev.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 5cb32c5b93d8..d3ca0dac1111 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -465,6 +465,12 @@ void static bdi_add_default_flusher_task(struct backing_dev_info *bdi)
465 if (!bdi_cap_writeback_dirty(bdi)) 465 if (!bdi_cap_writeback_dirty(bdi))
466 return; 466 return;
467 467
468 if (WARN_ON(!test_bit(BDI_registered, &bdi->state))) {
469 printk(KERN_ERR "bdi %p/%s is not registered!\n",
470 bdi, bdi->name);
471 return;
472 }
473
468 /* 474 /*
469 * Check with the helper whether to proceed adding a task. Will only 475 * Check with the helper whether to proceed adding a task. Will only
470 * abort if we two or more simultanous calls to 476 * abort if we two or more simultanous calls to
@@ -528,6 +534,7 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent,
528 } 534 }
529 535
530 bdi_debug_register(bdi, dev_name(dev)); 536 bdi_debug_register(bdi, dev_name(dev));
537 set_bit(BDI_registered, &bdi->state);
531exit: 538exit:
532 return ret; 539 return ret;
533} 540}