Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190089
b: refs/heads/master
c: 1f1b000
h: refs/heads/master
i:
  190087: ba8e433
v: v3
  • Loading branch information
Joern Engel committed Apr 15, 2010
1 parent 2eb37d7 commit 564d75f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ead88af5f577fd2b399a0fcdfe52605116fac489
refs/heads/master: 1f1b0008e8dd1930d6e89522c70f4a438374302a
6 changes: 6 additions & 0 deletions trunk/fs/logfs/logfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -727,4 +727,10 @@ static inline struct logfs_area *get_area(struct super_block *sb,
return logfs_super(sb)->s_area[(__force u8)gc_level];
}

static inline void logfs_mempool_destroy(mempool_t *pool)
{
if (pool)
mempool_destroy(pool);
}

#endif
6 changes: 2 additions & 4 deletions trunk/fs/logfs/readwrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -2243,8 +2243,6 @@ void logfs_cleanup_rw(struct super_block *sb)
struct logfs_super *super = logfs_super(sb);

destroy_meta_inode(super->s_segfile_inode);
if (super->s_block_pool)
mempool_destroy(super->s_block_pool);
if (super->s_shadow_pool)
mempool_destroy(super->s_shadow_pool);
logfs_mempool_destroy(super->s_block_pool);
logfs_mempool_destroy(super->s_shadow_pool);
}
2 changes: 1 addition & 1 deletion trunk/fs/logfs/segment.c
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ int logfs_init_areas(struct super_block *sb)
for (i--; i >= 0; i--)
free_area(super->s_area[i]);
free_area(super->s_journal_area);
mempool_destroy(super->s_alias_pool);
logfs_mempool_destroy(super->s_alias_pool);
return -ENOMEM;
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/logfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,8 @@ static void logfs_kill_sb(struct super_block *sb)
if (super->s_erase_page)
__free_page(super->s_erase_page);
super->s_devops->put_device(sb);
mempool_destroy(super->s_btree_pool);
mempool_destroy(super->s_alias_pool);
logfs_mempool_destroy(super->s_btree_pool);
logfs_mempool_destroy(super->s_alias_pool);
kfree(super);
log_super("LogFS: Finished unmounting\n");
}
Expand Down

0 comments on commit 564d75f

Please sign in to comment.