diff options
| -rw-r--r-- | fs/exofs/exofs.h | 2 | ||||
| -rw-r--r-- | fs/exofs/super.c | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/fs/exofs/exofs.h b/fs/exofs/exofs.h index 8442e353309f..54373278a353 100644 --- a/fs/exofs/exofs.h +++ b/fs/exofs/exofs.h | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | 35 | ||
| 36 | #include <linux/fs.h> | 36 | #include <linux/fs.h> |
| 37 | #include <linux/time.h> | 37 | #include <linux/time.h> |
| 38 | #include <linux/backing-dev.h> | ||
| 38 | #include "common.h" | 39 | #include "common.h" |
| 39 | 40 | ||
| 40 | /* FIXME: Remove once pnfs hits mainline | 41 | /* FIXME: Remove once pnfs hits mainline |
| @@ -92,6 +93,7 @@ struct exofs_sb_info { | |||
| 92 | struct exofs_layout layout; /* Default files layout, | 93 | struct exofs_layout layout; /* Default files layout, |
| 93 | * contains the variable osd_dev | 94 | * contains the variable osd_dev |
| 94 | * array. Keep last */ | 95 | * array. Keep last */ |
| 96 | struct backing_dev_info bdi; | ||
| 95 | struct osd_dev *_min_one_dev[1]; /* Place holder for one dev */ | 97 | struct osd_dev *_min_one_dev[1]; /* Place holder for one dev */ |
| 96 | }; | 98 | }; |
| 97 | 99 | ||
diff --git a/fs/exofs/super.c b/fs/exofs/super.c index 18e57ea1e5b4..03149b9a5178 100644 --- a/fs/exofs/super.c +++ b/fs/exofs/super.c | |||
| @@ -302,6 +302,7 @@ static void exofs_put_super(struct super_block *sb) | |||
| 302 | _exofs_print_device("Unmounting", NULL, sbi->layout.s_ods[0], | 302 | _exofs_print_device("Unmounting", NULL, sbi->layout.s_ods[0], |
| 303 | sbi->layout.s_pid); | 303 | sbi->layout.s_pid); |
| 304 | 304 | ||
| 305 | bdi_destroy(&sbi->bdi); | ||
| 305 | exofs_free_sbi(sbi); | 306 | exofs_free_sbi(sbi); |
| 306 | sb->s_fs_info = NULL; | 307 | sb->s_fs_info = NULL; |
| 307 | } | 308 | } |
| @@ -546,6 +547,10 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent) | |||
| 546 | if (!sbi) | 547 | if (!sbi) |
| 547 | return -ENOMEM; | 548 | return -ENOMEM; |
| 548 | 549 | ||
| 550 | ret = bdi_setup_and_register(&sbi->bdi, "exofs", BDI_CAP_MAP_COPY); | ||
| 551 | if (ret) | ||
| 552 | goto free_bdi; | ||
| 553 | |||
| 549 | /* use mount options to fill superblock */ | 554 | /* use mount options to fill superblock */ |
| 550 | od = osduld_path_lookup(opts->dev_name); | 555 | od = osduld_path_lookup(opts->dev_name); |
| 551 | if (IS_ERR(od)) { | 556 | if (IS_ERR(od)) { |
| @@ -612,6 +617,7 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent) | |||
| 612 | } | 617 | } |
| 613 | 618 | ||
| 614 | /* set up operation vectors */ | 619 | /* set up operation vectors */ |
| 620 | sb->s_bdi = &sbi->bdi; | ||
| 615 | sb->s_fs_info = sbi; | 621 | sb->s_fs_info = sbi; |
| 616 | sb->s_op = &exofs_sops; | 622 | sb->s_op = &exofs_sops; |
| 617 | sb->s_export_op = &exofs_export_ops; | 623 | sb->s_export_op = &exofs_export_ops; |
| @@ -643,6 +649,8 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent) | |||
| 643 | return 0; | 649 | return 0; |
| 644 | 650 | ||
| 645 | free_sbi: | 651 | free_sbi: |
| 652 | bdi_destroy(&sbi->bdi); | ||
| 653 | free_bdi: | ||
| 646 | EXOFS_ERR("Unable to mount exofs on %s pid=0x%llx err=%d\n", | 654 | EXOFS_ERR("Unable to mount exofs on %s pid=0x%llx err=%d\n", |
| 647 | opts->dev_name, sbi->layout.s_pid, ret); | 655 | opts->dev_name, sbi->layout.s_pid, ret); |
| 648 | exofs_free_sbi(sbi); | 656 | exofs_free_sbi(sbi); |
