diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index 0797568c5899f8dc0a9035f5cef7d6add0810ce7..ba7ec279c715fe03fa1a79e46143ca53678c7b2e 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c @@ -1461,7 +1461,6 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh) goto out; } - journal = transaction->t_journal; jbd_lock_bh_state(bh); if (is_handle_aborted(handle)) { @@ -1476,6 +1475,8 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh) goto out_unlock_bh; } + journal = transaction->t_journal; + if (jh->b_modified == 0) { /* * This buffer's got modified and becoming part