aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/glops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/glops.c')
-rw-r--r--fs/gfs2/glops.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index 32cc4fde975c..78d4184ffc7d 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -74,7 +74,7 @@ static void __gfs2_ail_flush(struct gfs2_glock *gl, bool fsync)
74 74
75 gfs2_trans_add_revoke(sdp, bd); 75 gfs2_trans_add_revoke(sdp, bd);
76 } 76 }
77 BUG_ON(!fsync && atomic_read(&gl->gl_ail_count)); 77 GLOCK_BUG_ON(gl, !fsync && atomic_read(&gl->gl_ail_count));
78 spin_unlock(&sdp->sd_ail_lock); 78 spin_unlock(&sdp->sd_ail_lock);
79 gfs2_log_unlock(sdp); 79 gfs2_log_unlock(sdp);
80} 80}
@@ -96,7 +96,7 @@ static void gfs2_ail_empty_gl(struct gfs2_glock *gl)
96 tr.tr_ip = (unsigned long)__builtin_return_address(0); 96 tr.tr_ip = (unsigned long)__builtin_return_address(0);
97 sb_start_intwrite(sdp->sd_vfs); 97 sb_start_intwrite(sdp->sd_vfs);
98 gfs2_log_reserve(sdp, tr.tr_reserved); 98 gfs2_log_reserve(sdp, tr.tr_reserved);
99 BUG_ON(current->journal_info); 99 WARN_ON_ONCE(current->journal_info);
100 current->journal_info = &tr; 100 current->journal_info = &tr;
101 101
102 __gfs2_ail_flush(gl, 0); 102 __gfs2_ail_flush(gl, 0);
@@ -139,7 +139,7 @@ static void rgrp_go_sync(struct gfs2_glock *gl)
139 139
140 if (!test_and_clear_bit(GLF_DIRTY, &gl->gl_flags)) 140 if (!test_and_clear_bit(GLF_DIRTY, &gl->gl_flags))
141 return; 141 return;
142 BUG_ON(gl->gl_state != LM_ST_EXCLUSIVE); 142 GLOCK_BUG_ON(gl, gl->gl_state != LM_ST_EXCLUSIVE);
143 143
144 gfs2_log_flush(gl->gl_sbd, gl); 144 gfs2_log_flush(gl->gl_sbd, gl);
145 filemap_fdatawrite(metamapping); 145 filemap_fdatawrite(metamapping);
@@ -168,7 +168,7 @@ static void rgrp_go_inval(struct gfs2_glock *gl, int flags)
168{ 168{
169 struct address_space *mapping = gfs2_glock2aspace(gl); 169 struct address_space *mapping = gfs2_glock2aspace(gl);
170 170
171 BUG_ON(!(flags & DIO_METADATA)); 171 WARN_ON_ONCE(!(flags & DIO_METADATA));
172 gfs2_assert_withdraw(gl->gl_sbd, !atomic_read(&gl->gl_ail_count)); 172 gfs2_assert_withdraw(gl->gl_sbd, !atomic_read(&gl->gl_ail_count));
173 truncate_inode_pages(mapping, 0); 173 truncate_inode_pages(mapping, 0);
174 174
@@ -197,7 +197,7 @@ static void inode_go_sync(struct gfs2_glock *gl)
197 if (!test_and_clear_bit(GLF_DIRTY, &gl->gl_flags)) 197 if (!test_and_clear_bit(GLF_DIRTY, &gl->gl_flags))
198 return; 198 return;
199 199
200 BUG_ON(gl->gl_state != LM_ST_EXCLUSIVE); 200 GLOCK_BUG_ON(gl, gl->gl_state != LM_ST_EXCLUSIVE);
201 201
202 gfs2_log_flush(gl->gl_sbd, gl); 202 gfs2_log_flush(gl->gl_sbd, gl);
203 filemap_fdatawrite(metamapping); 203 filemap_fdatawrite(metamapping);
@@ -536,7 +536,7 @@ const struct gfs2_glock_operations gfs2_meta_glops = {
536}; 536};
537 537
538const struct gfs2_glock_operations gfs2_inode_glops = { 538const struct gfs2_glock_operations gfs2_inode_glops = {
539 .go_xmote_th = inode_go_sync, 539 .go_sync = inode_go_sync,
540 .go_inval = inode_go_inval, 540 .go_inval = inode_go_inval,
541 .go_demote_ok = inode_go_demote_ok, 541 .go_demote_ok = inode_go_demote_ok,
542 .go_lock = inode_go_lock, 542 .go_lock = inode_go_lock,
@@ -546,17 +546,17 @@ const struct gfs2_glock_operations gfs2_inode_glops = {
546}; 546};
547 547
548const struct gfs2_glock_operations gfs2_rgrp_glops = { 548const struct gfs2_glock_operations gfs2_rgrp_glops = {
549 .go_xmote_th = rgrp_go_sync, 549 .go_sync = rgrp_go_sync,
550 .go_inval = rgrp_go_inval, 550 .go_inval = rgrp_go_inval,
551 .go_lock = gfs2_rgrp_go_lock, 551 .go_lock = gfs2_rgrp_go_lock,
552 .go_unlock = gfs2_rgrp_go_unlock, 552 .go_unlock = gfs2_rgrp_go_unlock,
553 .go_dump = gfs2_rgrp_dump, 553 .go_dump = gfs2_rgrp_dump,
554 .go_type = LM_TYPE_RGRP, 554 .go_type = LM_TYPE_RGRP,
555 .go_flags = GLOF_ASPACE, 555 .go_flags = GLOF_ASPACE | GLOF_LVB,
556}; 556};
557 557
558const struct gfs2_glock_operations gfs2_trans_glops = { 558const struct gfs2_glock_operations gfs2_trans_glops = {
559 .go_xmote_th = trans_go_sync, 559 .go_sync = trans_go_sync,
560 .go_xmote_bh = trans_go_xmote_bh, 560 .go_xmote_bh = trans_go_xmote_bh,
561 .go_demote_ok = trans_go_demote_ok, 561 .go_demote_ok = trans_go_demote_ok,
562 .go_type = LM_TYPE_NONDISK, 562 .go_type = LM_TYPE_NONDISK,
@@ -577,6 +577,7 @@ const struct gfs2_glock_operations gfs2_nondisk_glops = {
577 577
578const struct gfs2_glock_operations gfs2_quota_glops = { 578const struct gfs2_glock_operations gfs2_quota_glops = {
579 .go_type = LM_TYPE_QUOTA, 579 .go_type = LM_TYPE_QUOTA,
580 .go_flags = GLOF_LVB,
580}; 581};
581 582
582const struct gfs2_glock_operations gfs2_journal_glops = { 583const struct gfs2_glock_operations gfs2_journal_glops = {