Commit 96c86678 authored by Jan Kara's avatar Jan Kara Committed by Theodore Ts'o

jbd2: fix BH_JWrite setting in checkpointing code

BH_JWrite bit should be set when buffer is written to the journal. So
checkpointing shouldn't set this bit when writing out buffer. This didn't
cause any observable bug since BH_JWrite bit is used only for debugging
purposes but it's good to have this consistent.
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 79feb521
...@@ -266,7 +266,6 @@ __flush_batch(journal_t *journal, int *batch_count) ...@@ -266,7 +266,6 @@ __flush_batch(journal_t *journal, int *batch_count)
for (i = 0; i < *batch_count; i++) { for (i = 0; i < *batch_count; i++) {
struct buffer_head *bh = journal->j_chkpt_bhs[i]; struct buffer_head *bh = journal->j_chkpt_bhs[i];
clear_buffer_jwrite(bh);
BUFFER_TRACE(bh, "brelse"); BUFFER_TRACE(bh, "brelse");
__brelse(bh); __brelse(bh);
} }
...@@ -340,7 +339,6 @@ static int __process_buffer(journal_t *journal, struct journal_head *jh, ...@@ -340,7 +339,6 @@ static int __process_buffer(journal_t *journal, struct journal_head *jh,
BUFFER_TRACE(bh, "queue"); BUFFER_TRACE(bh, "queue");
get_bh(bh); get_bh(bh);
J_ASSERT_BH(bh, !buffer_jwrite(bh)); J_ASSERT_BH(bh, !buffer_jwrite(bh));
set_buffer_jwrite(bh);
journal->j_chkpt_bhs[*batch_count] = bh; journal->j_chkpt_bhs[*batch_count] = bh;
__buffer_relink_io(jh); __buffer_relink_io(jh);
jbd_unlock_bh_state(bh); jbd_unlock_bh_state(bh);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment