aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exofs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exofs/super.c')
-rw-r--r--fs/exofs/super.c8
1 files changed, 8 insertions, 0 deletions
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
645free_sbi: 651free_sbi:
652 bdi_destroy(&sbi->bdi);
653free_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);