aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ocfs2/Makefile2
-rw-r--r--fs/ocfs2/buffer_head_io.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/fs/ocfs2/Makefile b/fs/ocfs2/Makefile
index e27e6527912b..4342c7ee7d20 100644
--- a/fs/ocfs2/Makefile
+++ b/fs/ocfs2/Makefile
@@ -1,7 +1,5 @@
1ccflags-y := -Ifs/ocfs2 1ccflags-y := -Ifs/ocfs2
2 2
3ccflags-y += -DCATCH_BH_JBD_RACES
4
5obj-$(CONFIG_OCFS2_FS) += \ 3obj-$(CONFIG_OCFS2_FS) += \
6 ocfs2.o \ 4 ocfs2.o \
7 ocfs2_stackglue.o 5 ocfs2_stackglue.o
diff --git a/fs/ocfs2/buffer_head_io.c b/fs/ocfs2/buffer_head_io.c
index fe50ded1b4ce..498641eed2db 100644
--- a/fs/ocfs2/buffer_head_io.c
+++ b/fs/ocfs2/buffer_head_io.c
@@ -139,11 +139,16 @@ int ocfs2_read_blocks_sync(struct ocfs2_super *osb, u64 block,
139 139
140 lock_buffer(bh); 140 lock_buffer(bh);
141 if (buffer_jbd(bh)) { 141 if (buffer_jbd(bh)) {
142#ifdef CATCH_BH_JBD_RACES
142 mlog(ML_ERROR, 143 mlog(ML_ERROR,
143 "block %llu had the JBD bit set " 144 "block %llu had the JBD bit set "
144 "while I was in lock_buffer!", 145 "while I was in lock_buffer!",
145 (unsigned long long)bh->b_blocknr); 146 (unsigned long long)bh->b_blocknr);
146 BUG(); 147 BUG();
148#else
149 unlock_buffer(bh);
150 continue;
151#endif
147 } 152 }
148 153
149 clear_buffer_uptodate(bh); 154 clear_buffer_uptodate(bh);