Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287085
b: refs/heads/master
c: 1bcceaf
h: refs/heads/master
i:
  287083: 1e9faef
v: v3
  • Loading branch information
Joern Engel authored and Prasad Joshi committed Jan 28, 2012
1 parent 6c4d389 commit 0eaf937
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 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: 6c69494f6b442834f26377e02d43fc8e1272221d
refs/heads/master: 1bcceaff8cbe5e5698ccf1015c9a938aa72718c4
1 change: 1 addition & 0 deletions trunk/fs/logfs/logfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,7 @@ int logfs_init_mapping(struct super_block *sb);
void logfs_sync_area(struct logfs_area *area);
void logfs_sync_segments(struct super_block *sb);
void freeseg(struct super_block *sb, u32 segno);
void free_areas(struct super_block *sb);

/* area handling */
int logfs_init_areas(struct super_block *sb);
Expand Down
14 changes: 10 additions & 4 deletions trunk/fs/logfs/segment.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -944,10 +954,6 @@ int logfs_init_areas(struct super_block *sb)
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);
}
1 change: 1 addition & 0 deletions trunk/fs/logfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ static void logfs_kill_sb(struct super_block *sb)
/* Alias entries slow down mount, so evict as many as possible */
sync_filesystem(sb);
logfs_write_anchor(sb);
free_areas(sb);

/*
* From this point on alias entries are simply dropped - and any
Expand Down

0 comments on commit 0eaf937

Please sign in to comment.