summaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/lops.c2
-rw-r--r--fs/gfs2/trans.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index cf6fe363155..4cbef4c23a6 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -393,7 +393,7 @@ static void revoke_lo_before_commit(struct gfs2_sbd *sdp)
}
*(__be64 *)(bh->b_data + offset) = cpu_to_be64(bd->bd_blkno);
- kfree(bd);
+ kmem_cache_free(gfs2_bufdata_cachep, bd);
offset += sizeof(u64);
}
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index eadf96e0051..01cc27fefd8 100644
--- a/fs/gfs2/trans.c
+++ b/fs/gfs2/trans.c
@@ -144,7 +144,7 @@ void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta)
void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, u64 blkno)
{
- struct gfs2_bufdata *bd = kmalloc(sizeof(struct gfs2_bufdata),
+ struct gfs2_bufdata *bd = kmem_cache_alloc(gfs2_bufdata_cachep,
GFP_NOFS | __GFP_NOFAIL);
lops_init_le(&bd->bd_le, &gfs2_revoke_lops);
bd->bd_blkno = blkno;
@@ -172,7 +172,7 @@ void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, u64 blkno)
if (found) {
struct gfs2_trans *tr = current->journal_info;
- kfree(bd);
+ kmem_cache_free(gfs2_bufdata_cachep, bd);
tr->tr_num_revoke_rm++;
}
}