aboutsummaryrefslogtreecommitdiffstats
path: root/fs/logfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/logfs/super.c')
-rw-r--r--fs/logfs/super.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/logfs/super.c b/fs/logfs/super.c
index b60bfac3263c..5866ee6e1327 100644
--- a/fs/logfs/super.c
+++ b/fs/logfs/super.c
@@ -12,6 +12,7 @@
12#include "logfs.h" 12#include "logfs.h"
13#include <linux/bio.h> 13#include <linux/bio.h>
14#include <linux/slab.h> 14#include <linux/slab.h>
15#include <linux/blkdev.h>
15#include <linux/mtd/mtd.h> 16#include <linux/mtd/mtd.h>
16#include <linux/statfs.h> 17#include <linux/statfs.h>
17#include <linux/buffer_head.h> 18#include <linux/buffer_head.h>
@@ -137,6 +138,10 @@ static int logfs_sb_set(struct super_block *sb, void *_super)
137 sb->s_fs_info = super; 138 sb->s_fs_info = super;
138 sb->s_mtd = super->s_mtd; 139 sb->s_mtd = super->s_mtd;
139 sb->s_bdev = super->s_bdev; 140 sb->s_bdev = super->s_bdev;
141 if (sb->s_bdev)
142 sb->s_bdi = &bdev_get_queue(sb->s_bdev)->backing_dev_info;
143 if (sb->s_mtd)
144 sb->s_bdi = sb->s_mtd->backing_dev_info;
140 return 0; 145 return 0;
141} 146}
142 147
@@ -452,6 +457,8 @@ static int logfs_read_sb(struct super_block *sb, int read_only)
452 457
453 btree_init_mempool64(&super->s_shadow_tree.new, super->s_btree_pool); 458 btree_init_mempool64(&super->s_shadow_tree.new, super->s_btree_pool);
454 btree_init_mempool64(&super->s_shadow_tree.old, super->s_btree_pool); 459 btree_init_mempool64(&super->s_shadow_tree.old, super->s_btree_pool);
460 btree_init_mempool32(&super->s_shadow_tree.segment_map,
461 super->s_btree_pool);
455 462
456 ret = logfs_init_mapping(sb); 463 ret = logfs_init_mapping(sb);
457 if (ret) 464 if (ret)
@@ -516,8 +523,8 @@ static void logfs_kill_sb(struct super_block *sb)
516 if (super->s_erase_page) 523 if (super->s_erase_page)
517 __free_page(super->s_erase_page); 524 __free_page(super->s_erase_page);
518 super->s_devops->put_device(sb); 525 super->s_devops->put_device(sb);
519 mempool_destroy(super->s_btree_pool); 526 logfs_mempool_destroy(super->s_btree_pool);
520 mempool_destroy(super->s_alias_pool); 527 logfs_mempool_destroy(super->s_alias_pool);
521 kfree(super); 528 kfree(super);
522 log_super("LogFS: Finished unmounting\n"); 529 log_super("LogFS: Finished unmounting\n");
523} 530}