Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89498
b: refs/heads/master
c: 6bdd9be
h: refs/heads/master
v: v3
  • Loading branch information
Bob Peterson authored and Steven Whitehouse committed Mar 31, 2008
1 parent 6b61266 commit 7d58427
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 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: 3ad62e87cd38817361e165cf4ad496ab76e19e81
refs/heads/master: 6bdd9be628fa5f4dd14eb89ebddc12840d684277
10 changes: 10 additions & 0 deletions trunk/fs/gfs2/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ static int __init init_gfs2_fs(void)
if (!gfs2_bufdata_cachep)
goto fail;

gfs2_rgrpd_cachep = kmem_cache_create("gfs2_rgrpd",
sizeof(struct gfs2_rgrpd),
0, 0, NULL);
if (!gfs2_rgrpd_cachep)
goto fail;

error = register_filesystem(&gfs2_fs_type);
if (error)
goto fail;
Expand All @@ -108,6 +114,9 @@ static int __init init_gfs2_fs(void)
fail:
gfs2_glock_exit();

if (gfs2_rgrpd_cachep)
kmem_cache_destroy(gfs2_rgrpd_cachep);

if (gfs2_bufdata_cachep)
kmem_cache_destroy(gfs2_bufdata_cachep);

Expand All @@ -133,6 +142,7 @@ static void __exit exit_gfs2_fs(void)
unregister_filesystem(&gfs2_fs_type);
unregister_filesystem(&gfs2meta_fs_type);

kmem_cache_destroy(gfs2_rgrpd_cachep);
kmem_cache_destroy(gfs2_bufdata_cachep);
kmem_cache_destroy(gfs2_inode_cachep);
kmem_cache_destroy(gfs2_glock_cachep);
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/gfs2/rgrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ static void clear_rgrpdi(struct gfs2_sbd *sdp)
}

kfree(rgd->rd_bits);
kfree(rgd);
kmem_cache_free(gfs2_rgrpd_cachep, rgd);
}
}

Expand Down Expand Up @@ -516,7 +516,7 @@ static int read_rindex_entry(struct gfs2_inode *ip,
return error;
}

rgd = kzalloc(sizeof(struct gfs2_rgrpd), GFP_NOFS);
rgd = kmem_cache_zalloc(gfs2_rgrpd_cachep, GFP_NOFS);
error = -ENOMEM;
if (!rgd)
return error;
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/gfs2/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
struct kmem_cache *gfs2_glock_cachep __read_mostly;
struct kmem_cache *gfs2_inode_cachep __read_mostly;
struct kmem_cache *gfs2_bufdata_cachep __read_mostly;
struct kmem_cache *gfs2_rgrpd_cachep __read_mostly;

void gfs2_assert_i(struct gfs2_sbd *sdp)
{
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/gfs2/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ gfs2_io_error_bh_i((sdp), (bh), __FUNCTION__, __FILE__, __LINE__);
extern struct kmem_cache *gfs2_glock_cachep;
extern struct kmem_cache *gfs2_inode_cachep;
extern struct kmem_cache *gfs2_bufdata_cachep;
extern struct kmem_cache *gfs2_rgrpd_cachep;

static inline unsigned int gfs2_tune_get_i(struct gfs2_tune *gt,
unsigned int *p)
Expand Down

0 comments on commit 7d58427

Please sign in to comment.