|
@@ -617,6 +617,12 @@ repeat:
|
|
|
jh->b_next_transaction == transaction)
|
|
|
goto done;
|
|
|
|
|
|
+ /*
|
|
|
+ * this is the first time this transaction is touching this buffer,
|
|
|
+ * reset the modified flag
|
|
|
+ */
|
|
|
+ jh->b_modified = 0;
|
|
|
+
|
|
|
/*
|
|
|
* If there is already a copy-out version of this buffer, then we don't
|
|
|
* need to make another one
|
|
@@ -829,9 +835,16 @@ int jbd2_journal_get_create_access(handle_t *handle, struct buffer_head *bh)
|
|
|
|
|
|
if (jh->b_transaction == NULL) {
|
|
|
jh->b_transaction = transaction;
|
|
|
+
|
|
|
+ /* first access by this transaction */
|
|
|
+ jh->b_modified = 0;
|
|
|
+
|
|
|
JBUFFER_TRACE(jh, "file as BJ_Reserved");
|
|
|
__jbd2_journal_file_buffer(jh, transaction, BJ_Reserved);
|
|
|
} else if (jh->b_transaction == journal->j_committing_transaction) {
|
|
|
+ /* first access by this transaction */
|
|
|
+ jh->b_modified = 0;
|
|
|
+
|
|
|
JBUFFER_TRACE(jh, "set next transaction");
|
|
|
jh->b_next_transaction = transaction;
|
|
|
}
|