diff options
Diffstat (limited to 'fs/exofs/super.c')
-rw-r--r-- | fs/exofs/super.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/exofs/super.c b/fs/exofs/super.c index 6cf5e4e84d61..03149b9a5178 100644 --- a/fs/exofs/super.c +++ b/fs/exofs/super.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/vfs.h> | 37 | #include <linux/vfs.h> |
38 | #include <linux/random.h> | 38 | #include <linux/random.h> |
39 | #include <linux/exportfs.h> | 39 | #include <linux/exportfs.h> |
40 | #include <linux/slab.h> | ||
40 | 41 | ||
41 | #include "exofs.h" | 42 | #include "exofs.h" |
42 | 43 | ||
@@ -301,6 +302,7 @@ static void exofs_put_super(struct super_block *sb) | |||
301 | _exofs_print_device("Unmounting", NULL, sbi->layout.s_ods[0], | 302 | _exofs_print_device("Unmounting", NULL, sbi->layout.s_ods[0], |
302 | sbi->layout.s_pid); | 303 | sbi->layout.s_pid); |
303 | 304 | ||
305 | bdi_destroy(&sbi->bdi); | ||
304 | exofs_free_sbi(sbi); | 306 | exofs_free_sbi(sbi); |
305 | sb->s_fs_info = NULL; | 307 | sb->s_fs_info = NULL; |
306 | } | 308 | } |
@@ -545,6 +547,10 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent) | |||
545 | if (!sbi) | 547 | if (!sbi) |
546 | return -ENOMEM; | 548 | return -ENOMEM; |
547 | 549 | ||
550 | ret = bdi_setup_and_register(&sbi->bdi, "exofs", BDI_CAP_MAP_COPY); | ||
551 | if (ret) | ||
552 | goto free_bdi; | ||
553 | |||
548 | /* use mount options to fill superblock */ | 554 | /* use mount options to fill superblock */ |
549 | od = osduld_path_lookup(opts->dev_name); | 555 | od = osduld_path_lookup(opts->dev_name); |
550 | if (IS_ERR(od)) { | 556 | if (IS_ERR(od)) { |
@@ -611,6 +617,7 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent) | |||
611 | } | 617 | } |
612 | 618 | ||
613 | /* set up operation vectors */ | 619 | /* set up operation vectors */ |
620 | sb->s_bdi = &sbi->bdi; | ||
614 | sb->s_fs_info = sbi; | 621 | sb->s_fs_info = sbi; |
615 | sb->s_op = &exofs_sops; | 622 | sb->s_op = &exofs_sops; |
616 | sb->s_export_op = &exofs_export_ops; | 623 | sb->s_export_op = &exofs_export_ops; |
@@ -642,6 +649,8 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent) | |||
642 | return 0; | 649 | return 0; |
643 | 650 | ||
644 | free_sbi: | 651 | free_sbi: |
652 | bdi_destroy(&sbi->bdi); | ||
653 | free_bdi: | ||
645 | 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", |
646 | opts->dev_name, sbi->layout.s_pid, ret); | 655 | opts->dev_name, sbi->layout.s_pid, ret); |
647 | exofs_free_sbi(sbi); | 656 | exofs_free_sbi(sbi); |