summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/rgrp.c
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2008-01-28 17:20:26 -0600
committerSteven Whitehouse <swhiteho@redhat.com>2008-03-31 10:40:07 +0100
commit6bdd9be628fa5f4dd14eb89ebddc12840d684277 (patch)
tree7a995fa251a55af6f7b185810a24a7ebb5d00a33 /fs/gfs2/rgrp.c
parent3ad62e87cd38817361e165cf4ad496ab76e19e81 (diff)
downloadkernel-crypto-6bdd9be628fa5f4dd14eb89ebddc12840d684277.tar.gz
kernel-crypto-6bdd9be628fa5f4dd14eb89ebddc12840d684277.tar.xz
kernel-crypto-6bdd9be628fa5f4dd14eb89ebddc12840d684277.zip
[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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 7b9d6f1d152..dc7e83eed32 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -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);
}
}
@@ -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;