|
|
@@ -1219,11 +1219,12 @@ int jbd2_journal_get_undo_access(handle_t *handle, struct buffer_head *bh)
|
|
|
struct journal_head *jh;
|
|
|
char *committed_data = NULL;
|
|
|
|
|
|
- JBUFFER_TRACE(jh, "entry");
|
|
|
if (jbd2_write_access_granted(handle, bh, true))
|
|
|
return 0;
|
|
|
|
|
|
jh = jbd2_journal_add_journal_head(bh);
|
|
|
+ JBUFFER_TRACE(jh, "entry");
|
|
|
+
|
|
|
/*
|
|
|
* Do this first --- it can drop the journal lock, so we want to
|
|
|
* make sure that obtaining the committed_data is done
|
|
|
@@ -1334,15 +1335,17 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh)
|
|
|
|
|
|
if (is_handle_aborted(handle))
|
|
|
return -EROFS;
|
|
|
- if (!buffer_jbd(bh)) {
|
|
|
- ret = -EUCLEAN;
|
|
|
- goto out;
|
|
|
- }
|
|
|
+ if (!buffer_jbd(bh))
|
|
|
+ return -EUCLEAN;
|
|
|
+
|
|
|
/*
|
|
|
* We don't grab jh reference here since the buffer must be part
|
|
|
* of the running transaction.
|
|
|
*/
|
|
|
jh = bh2jh(bh);
|
|
|
+ jbd_debug(5, "journal_head %p\n", jh);
|
|
|
+ JBUFFER_TRACE(jh, "entry");
|
|
|
+
|
|
|
/*
|
|
|
* This and the following assertions are unreliable since we may see jh
|
|
|
* in inconsistent state unless we grab bh_state lock. But this is
|
|
|
@@ -1376,9 +1379,6 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh)
|
|
|
}
|
|
|
|
|
|
journal = transaction->t_journal;
|
|
|
- jbd_debug(5, "journal_head %p\n", jh);
|
|
|
- JBUFFER_TRACE(jh, "entry");
|
|
|
-
|
|
|
jbd_lock_bh_state(bh);
|
|
|
|
|
|
if (jh->b_modified == 0) {
|