Merge branch 'akpm' (patches from Andrew)
[linux-2.6-microblaze.git] / mm / backing-dev.c
index 6122c78..4a9d4e2 100644 (file)
@@ -818,6 +818,7 @@ struct backing_dev_info *bdi_alloc(int node_id)
        bdi->capabilities = BDI_CAP_WRITEBACK | BDI_CAP_WRITEBACK_ACCT;
        bdi->ra_pages = VM_READAHEAD_PAGES;
        bdi->io_pages = VM_READAHEAD_PAGES;
+       timer_setup(&bdi->laptop_mode_wb_timer, laptop_mode_timer_fn, 0);
        return bdi;
 }
 EXPORT_SYMBOL(bdi_alloc);
@@ -939,6 +940,8 @@ static void bdi_remove_from_list(struct backing_dev_info *bdi)
 
 void bdi_unregister(struct backing_dev_info *bdi)
 {
+       del_timer_sync(&bdi->laptop_mode_wb_timer);
+
        /* make sure nobody finds us on the bdi_list anymore */
        bdi_remove_from_list(bdi);
        wb_shutdown(&bdi->wb);