btrfs: convert to using bdi_setup_and_register()

It's now a provided helper, so get rid of the internal setup
and btrfs atomic_t bdi enumerator.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

+1 -11
+1 -11
fs/btrfs/disk-io.c
··· 44 44 static void end_workqueue_fn(struct btrfs_work *work); 45 45 static void free_fs_root(struct btrfs_root *root); 46 46 47 - static atomic_t btrfs_bdi_num = ATOMIC_INIT(0); 48 - 49 47 /* 50 48 * end_io_wq structs are used to do processing in task context when an IO is 51 49 * complete. This is used during reads to verify checksums, and it is used ··· 1373 1375 { 1374 1376 int err; 1375 1377 1376 - bdi->name = "btrfs"; 1377 1378 bdi->capabilities = BDI_CAP_MAP_COPY; 1378 - err = bdi_init(bdi); 1379 + err = bdi_setup_and_register(bdi, "btrfs", BDI_CAP_MAP_COPY); 1379 1380 if (err) 1380 1381 return err; 1381 - 1382 - err = bdi_register(bdi, NULL, "btrfs-%d", 1383 - atomic_inc_return(&btrfs_bdi_num)); 1384 - if (err) { 1385 - bdi_destroy(bdi); 1386 - return err; 1387 - } 1388 1382 1389 1383 bdi->ra_pages = default_backing_dev_info.ra_pages; 1390 1384 bdi->unplug_io_fn = btrfs_unplug_io_fn;