Also a debugging aid. Signed-off-by: Jens Axboe <jens.axboe@xxxxxxxxxx> --- include/linux/backing-dev.h | 1 + mm/backing-dev.c | 6 ++++++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 3d373d4..c65b219 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h @@ -29,6 +29,7 @@ enum bdi_state { BDI_wblist_lock, /* bdi->wb_list now needs locking */ BDI_write_congested, /* The write queue is getting full */ BDI_read_congested, /* The read queue is getting full */ + BDI_registered, BDI_unused, /* Available bits start here */ }; diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 981e8e8..18faf79 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -474,6 +474,11 @@ void bdi_add_flusher_task(struct backing_dev_info *bdi) if (!bdi_cap_writeback_dirty(bdi)) return; + if (!test_bit(BDI_registered, &bdi->state)) { + printk("bdi %p/%s is not registered!\n", bdi, bdi->name); + return; + } + /* * Someone already marked this pending for task creation */ @@ -541,6 +546,7 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent, bdi->dev = dev; bdi_debug_register(bdi, dev_name(dev)); + set_bit(BDI_registered, &bdi->state); exit: return ret; -- 1.6.2.12.g83676 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html