diff options
author | Bob Peterson <rpeterso@redhat.com> | 2008-01-28 18:20:26 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2008-03-31 05:40:07 -0400 |
commit | 6bdd9be628fa5f4dd14eb89ebddc12840d684277 (patch) | |
tree | 7a995fa251a55af6f7b185810a24a7ebb5d00a33 /fs/gfs2/rgrp.c | |
parent | 3ad62e87cd38817361e165cf4ad496ab76e19e81 (diff) |
[GFS2] Allocate gfs2_rgrpd from slab memory
This patch moves the gfs2_rgrpd structure to its own slab
memory. This makes it easier to control and monitor, and
yields less memory fragmentation.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/rgrp.c')
-rw-r--r-- | fs/gfs2/rgrp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 7b9d6f1d1527..dc7e83eed32d 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
@@ -353,7 +353,7 @@ static void clear_rgrpdi(struct gfs2_sbd *sdp) | |||
353 | } | 353 | } |
354 | 354 | ||
355 | kfree(rgd->rd_bits); | 355 | kfree(rgd->rd_bits); |
356 | kfree(rgd); | 356 | kmem_cache_free(gfs2_rgrpd_cachep, rgd); |
357 | } | 357 | } |
358 | } | 358 | } |
359 | 359 | ||
@@ -516,7 +516,7 @@ static int read_rindex_entry(struct gfs2_inode *ip, | |||
516 | return error; | 516 | return error; |
517 | } | 517 | } |
518 | 518 | ||
519 | rgd = kzalloc(sizeof(struct gfs2_rgrpd), GFP_NOFS); | 519 | rgd = kmem_cache_zalloc(gfs2_rgrpd_cachep, GFP_NOFS); |
520 | error = -ENOMEM; | 520 | error = -ENOMEM; |
521 | if (!rgd) | 521 | if (!rgd) |
522 | return error; | 522 | return error; |