diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2007-09-02 17:47:38 +0200 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2007-10-10 09:56:10 +0200 |
commit | 0820ab517e1b100ee3f9584ec27f93309689ebe7 (patch) | |
tree | db2baf9e6d2ac545c344a412fe31371a09bf9b68 /fs/gfs2/trans.c | |
parent | [GFS2] Replace revoke structure with bufdata structure (diff) | |
download | linux-0820ab517e1b100ee3f9584ec27f93309689ebe7.tar.xz linux-0820ab517e1b100ee3f9584ec27f93309689ebe7.zip |
[GFS2] Use slab operations for all gfs2_bufdata allocations
The old revoke structure was allocated using kalloc/kfree but
there is a slab cache for gfs2_bufdata, so we should use that
now that the structures have been converted.
This is part two of the patch series to merge the revoke
and gfs2_bufdata structures.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/trans.c')
-rw-r--r-- | fs/gfs2/trans.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index eadf96e00510..01cc27fefd84 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++; } } |