diff options
Diffstat (limited to 'fs/gfs2/lops.c')
-rw-r--r-- | fs/gfs2/lops.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index fe369bd9e10c..87e6e0d66bb7 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/spinlock.h> | 12 | #include <linux/spinlock.h> |
13 | #include <linux/completion.h> | 13 | #include <linux/completion.h> |
14 | #include <linux/buffer_head.h> | 14 | #include <linux/buffer_head.h> |
15 | #include <linux/mempool.h> | ||
15 | #include <linux/gfs2_ondisk.h> | 16 | #include <linux/gfs2_ondisk.h> |
16 | #include <linux/bio.h> | 17 | #include <linux/bio.h> |
17 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
@@ -199,7 +200,7 @@ static void gfs2_fake_write_endio(struct buffer_head *bh, int uptodate) | |||
199 | struct gfs2_sbd *sdp = bd->bd_gl->gl_sbd; | 200 | struct gfs2_sbd *sdp = bd->bd_gl->gl_sbd; |
200 | 201 | ||
201 | end_buffer_write_sync(bh, uptodate); | 202 | end_buffer_write_sync(bh, uptodate); |
202 | free_buffer_head(bh); | 203 | mempool_free(bh, gfs2_bh_pool); |
203 | unlock_buffer(real_bh); | 204 | unlock_buffer(real_bh); |
204 | brelse(real_bh); | 205 | brelse(real_bh); |
205 | if (atomic_dec_and_test(&sdp->sd_log_in_flight)) | 206 | if (atomic_dec_and_test(&sdp->sd_log_in_flight)) |
@@ -220,7 +221,7 @@ static struct buffer_head *gfs2_log_fake_buf(struct gfs2_sbd *sdp, | |||
220 | u64 blkno = gfs2_log_bmap(sdp, sdp->sd_log_flush_head); | 221 | u64 blkno = gfs2_log_bmap(sdp, sdp->sd_log_flush_head); |
221 | struct buffer_head *bh; | 222 | struct buffer_head *bh; |
222 | 223 | ||
223 | bh = alloc_buffer_head(GFP_NOFS | __GFP_NOFAIL); | 224 | bh = mempool_alloc(gfs2_bh_pool, GFP_NOFS); |
224 | atomic_set(&bh->b_count, 1); | 225 | atomic_set(&bh->b_count, 1); |
225 | bh->b_state = (1 << BH_Mapped) | (1 << BH_Uptodate) | (1 << BH_Lock); | 226 | bh->b_state = (1 << BH_Mapped) | (1 << BH_Uptodate) | (1 << BH_Lock); |
226 | set_bh_page(bh, real->b_page, bh_offset(real)); | 227 | set_bh_page(bh, real->b_page, bh_offset(real)); |