diff options
Diffstat (limited to 'fs/gfs2/glops.c')
-rw-r--r-- | fs/gfs2/glops.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 777ca46010e8..4670dcb2a877 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c | |||
@@ -41,7 +41,6 @@ static void gfs2_ail_empty_gl(struct gfs2_glock *gl) | |||
41 | struct list_head *head = &gl->gl_ail_list; | 41 | struct list_head *head = &gl->gl_ail_list; |
42 | struct gfs2_bufdata *bd; | 42 | struct gfs2_bufdata *bd; |
43 | struct buffer_head *bh; | 43 | struct buffer_head *bh; |
44 | u64 blkno; | ||
45 | int error; | 44 | int error; |
46 | 45 | ||
47 | blocks = atomic_read(&gl->gl_ail_count); | 46 | blocks = atomic_read(&gl->gl_ail_count); |
@@ -57,19 +56,12 @@ static void gfs2_ail_empty_gl(struct gfs2_glock *gl) | |||
57 | bd = list_entry(head->next, struct gfs2_bufdata, | 56 | bd = list_entry(head->next, struct gfs2_bufdata, |
58 | bd_ail_gl_list); | 57 | bd_ail_gl_list); |
59 | bh = bd->bd_bh; | 58 | bh = bd->bd_bh; |
60 | blkno = bh->b_blocknr; | 59 | gfs2_remove_from_ail(NULL, bd); |
60 | bd->bd_bh = NULL; | ||
61 | bh->b_private = NULL; | ||
62 | bd->bd_blkno = bh->b_blocknr; | ||
61 | gfs2_assert_withdraw(sdp, !buffer_busy(bh)); | 63 | gfs2_assert_withdraw(sdp, !buffer_busy(bh)); |
62 | 64 | gfs2_trans_add_revoke(sdp, bd); | |
63 | bd->bd_ail = NULL; | ||
64 | list_del(&bd->bd_ail_st_list); | ||
65 | list_del(&bd->bd_ail_gl_list); | ||
66 | atomic_dec(&gl->gl_ail_count); | ||
67 | brelse(bh); | ||
68 | gfs2_log_unlock(sdp); | ||
69 | |||
70 | gfs2_trans_add_revoke(sdp, blkno); | ||
71 | |||
72 | gfs2_log_lock(sdp); | ||
73 | } | 65 | } |
74 | gfs2_assert_withdraw(sdp, !atomic_read(&gl->gl_ail_count)); | 66 | gfs2_assert_withdraw(sdp, !atomic_read(&gl->gl_ail_count)); |
75 | gfs2_log_unlock(sdp); | 67 | gfs2_log_unlock(sdp); |
@@ -156,9 +148,11 @@ static void inode_go_sync(struct gfs2_glock *gl) | |||
156 | ip = NULL; | 148 | ip = NULL; |
157 | 149 | ||
158 | if (test_bit(GLF_DIRTY, &gl->gl_flags)) { | 150 | if (test_bit(GLF_DIRTY, &gl->gl_flags)) { |
159 | if (ip) | 151 | if (ip && !gfs2_is_jdata(ip)) |
160 | filemap_fdatawrite(ip->i_inode.i_mapping); | 152 | filemap_fdatawrite(ip->i_inode.i_mapping); |
161 | gfs2_log_flush(gl->gl_sbd, gl); | 153 | gfs2_log_flush(gl->gl_sbd, gl); |
154 | if (ip && gfs2_is_jdata(ip)) | ||
155 | filemap_fdatawrite(ip->i_inode.i_mapping); | ||
162 | gfs2_meta_sync(gl); | 156 | gfs2_meta_sync(gl); |
163 | if (ip) { | 157 | if (ip) { |
164 | struct address_space *mapping = ip->i_inode.i_mapping; | 158 | struct address_space *mapping = ip->i_inode.i_mapping; |
@@ -452,6 +446,7 @@ const struct gfs2_glock_operations gfs2_inode_glops = { | |||
452 | .go_lock = inode_go_lock, | 446 | .go_lock = inode_go_lock, |
453 | .go_unlock = inode_go_unlock, | 447 | .go_unlock = inode_go_unlock, |
454 | .go_type = LM_TYPE_INODE, | 448 | .go_type = LM_TYPE_INODE, |
449 | .go_min_hold_time = HZ / 10, | ||
455 | }; | 450 | }; |
456 | 451 | ||
457 | const struct gfs2_glock_operations gfs2_rgrp_glops = { | 452 | const struct gfs2_glock_operations gfs2_rgrp_glops = { |
@@ -462,6 +457,7 @@ const struct gfs2_glock_operations gfs2_rgrp_glops = { | |||
462 | .go_lock = rgrp_go_lock, | 457 | .go_lock = rgrp_go_lock, |
463 | .go_unlock = rgrp_go_unlock, | 458 | .go_unlock = rgrp_go_unlock, |
464 | .go_type = LM_TYPE_RGRP, | 459 | .go_type = LM_TYPE_RGRP, |
460 | .go_min_hold_time = HZ / 10, | ||
465 | }; | 461 | }; |
466 | 462 | ||
467 | const struct gfs2_glock_operations gfs2_trans_glops = { | 463 | const struct gfs2_glock_operations gfs2_trans_glops = { |