diff options
author | Joern Engel <joern@logfs.org> | 2011-08-05 11:18:19 +0200 |
---|---|---|
committer | Prasad Joshi <prasadjoshi.linux@gmail.com> | 2012-01-28 11:42:39 +0530 |
commit | 1bcceaff8cbe5e5698ccf1015c9a938aa72718c4 (patch) | |
tree | 2e36c3d9d5577dbfd3998cab37576a8761cf18fa /fs/logfs/segment.c | |
parent | 6c69494f6b442834f26377e02d43fc8e1272221d (diff) |
logfs: Free areas before calling generic_shutdown_super()
Or hit an assertion in map_invalidatepage() instead.
Signed-off-by: Joern Engel <joern@logfs.org>
Diffstat (limited to 'fs/logfs/segment.c')
-rw-r--r-- | fs/logfs/segment.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/logfs/segment.c b/fs/logfs/segment.c index 6aee6092860..ab798ed1cc8 100644 --- a/fs/logfs/segment.c +++ b/fs/logfs/segment.c @@ -862,6 +862,16 @@ static void free_area(struct logfs_area *area) kfree(area); } +void free_areas(struct super_block *sb) +{ + struct logfs_super *super = logfs_super(sb); + int i; + + for_each_area(i) + free_area(super->s_area[i]); + free_area(super->s_journal_area); +} + static struct logfs_area *alloc_area(struct super_block *sb) { struct logfs_area *area; @@ -944,10 +954,6 @@ err: void logfs_cleanup_areas(struct super_block *sb) { struct logfs_super *super = logfs_super(sb); - int i; btree_grim_visitor128(&super->s_object_alias_tree, 0, kill_alias); - for_each_area(i) - free_area(super->s_area[i]); - free_area(super->s_journal_area); } |