aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/meta_io.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /fs/gfs2/meta_io.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'fs/gfs2/meta_io.c')
-rw-r--r--fs/gfs2/meta_io.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c
index f3b071f921aa..747238cd9f96 100644
--- a/fs/gfs2/meta_io.c
+++ b/fs/gfs2/meta_io.c
@@ -31,13 +31,14 @@
31#include "rgrp.h" 31#include "rgrp.h"
32#include "trans.h" 32#include "trans.h"
33#include "util.h" 33#include "util.h"
34#include "trace_gfs2.h"
34 35
35static int gfs2_aspace_writepage(struct page *page, struct writeback_control *wbc) 36static int gfs2_aspace_writepage(struct page *page, struct writeback_control *wbc)
36{ 37{
37 struct buffer_head *bh, *head; 38 struct buffer_head *bh, *head;
38 int nr_underway = 0; 39 int nr_underway = 0;
39 int write_op = REQ_META | 40 int write_op = REQ_META |
40 (wbc->sync_mode == WB_SYNC_ALL ? WRITE_SYNC_PLUG : WRITE); 41 (wbc->sync_mode == WB_SYNC_ALL ? WRITE_SYNC : WRITE);
41 42
42 BUG_ON(!PageLocked(page)); 43 BUG_ON(!PageLocked(page));
43 BUG_ON(!page_has_buffers(page)); 44 BUG_ON(!page_has_buffers(page));
@@ -55,7 +56,7 @@ static int gfs2_aspace_writepage(struct page *page, struct writeback_control *wb
55 * activity, but those code paths have their own higher-level 56 * activity, but those code paths have their own higher-level
56 * throttling. 57 * throttling.
57 */ 58 */
58 if (wbc->sync_mode != WB_SYNC_NONE || !wbc->nonblocking) { 59 if (wbc->sync_mode != WB_SYNC_NONE) {
59 lock_buffer(bh); 60 lock_buffer(bh);
60 } else if (!trylock_buffer(bh)) { 61 } else if (!trylock_buffer(bh)) {
61 redirty_page_for_writepage(wbc, page); 62 redirty_page_for_writepage(wbc, page);
@@ -94,7 +95,6 @@ static int gfs2_aspace_writepage(struct page *page, struct writeback_control *wb
94const struct address_space_operations gfs2_meta_aops = { 95const struct address_space_operations gfs2_meta_aops = {
95 .writepage = gfs2_aspace_writepage, 96 .writepage = gfs2_aspace_writepage,
96 .releasepage = gfs2_releasepage, 97 .releasepage = gfs2_releasepage,
97 .sync_page = block_sync_page,
98}; 98};
99 99
100/** 100/**
@@ -311,6 +311,7 @@ void gfs2_remove_from_journal(struct buffer_head *bh, struct gfs2_trans *tr, int
311 struct gfs2_bufdata *bd = bh->b_private; 311 struct gfs2_bufdata *bd = bh->b_private;
312 312
313 if (test_clear_buffer_pinned(bh)) { 313 if (test_clear_buffer_pinned(bh)) {
314 trace_gfs2_pin(bd, 0);
314 atomic_dec(&sdp->sd_log_pinned); 315 atomic_dec(&sdp->sd_log_pinned);
315 list_del_init(&bd->bd_le.le_list); 316 list_del_init(&bd->bd_le.le_list);
316 if (meta) { 317 if (meta) {
@@ -326,6 +327,7 @@ void gfs2_remove_from_journal(struct buffer_head *bh, struct gfs2_trans *tr, int
326 brelse(bh); 327 brelse(bh);
327 } 328 }
328 if (bd) { 329 if (bd) {
330 spin_lock(&sdp->sd_ail_lock);
329 if (bd->bd_ail) { 331 if (bd->bd_ail) {
330 gfs2_remove_from_ail(bd); 332 gfs2_remove_from_ail(bd);
331 bh->b_private = NULL; 333 bh->b_private = NULL;
@@ -333,6 +335,7 @@ void gfs2_remove_from_journal(struct buffer_head *bh, struct gfs2_trans *tr, int
333 bd->bd_blkno = bh->b_blocknr; 335 bd->bd_blkno = bh->b_blocknr;
334 gfs2_trans_add_revoke(sdp, bd); 336 gfs2_trans_add_revoke(sdp, bd);
335 } 337 }
338 spin_unlock(&sdp->sd_ail_lock);
336 } 339 }
337 clear_buffer_dirty(bh); 340 clear_buffer_dirty(bh);
338 clear_buffer_uptodate(bh); 341 clear_buffer_uptodate(bh);