summaryrefslogtreecommitdiffstats
path: root/fs/jbd2/transaction.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2018-07-16 09:04:54 +0200
committerGreg Kroah-Hartman2018-07-16 09:04:54 +0200
commit83cf9cd6d50ed4f7e6ae265e80e38b235c792f5f (patch)
tree6016c386c321cd6a3e8575e01ed9f10834fc5081 /fs/jbd2/transaction.c
parentparport: ieee1284: mark expected switch fall-throughs (diff)
parentLinux 4.18-rc5 (diff)
downloadkernel-qcow2-linux-83cf9cd6d50ed4f7e6ae265e80e38b235c792f5f.tar.gz
kernel-qcow2-linux-83cf9cd6d50ed4f7e6ae265e80e38b235c792f5f.tar.xz
kernel-qcow2-linux-83cf9cd6d50ed4f7e6ae265e80e38b235c792f5f.zip
Merge 4.18-rc5 into char-misc-next
We want the char-misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/jbd2/transaction.c')
-rw-r--r--fs/jbd2/transaction.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 51dd68e67b0f..c0b66a7a795b 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -1361,6 +1361,13 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh)
if (jh->b_transaction == transaction &&
jh->b_jlist != BJ_Metadata) {
jbd_lock_bh_state(bh);
+ if (jh->b_transaction == transaction &&
+ jh->b_jlist != BJ_Metadata)
+ pr_err("JBD2: assertion failure: h_type=%u "
+ "h_line_no=%u block_no=%llu jlist=%u\n",
+ handle->h_type, handle->h_line_no,
+ (unsigned long long) bh->b_blocknr,
+ jh->b_jlist);
J_ASSERT_JH(jh, jh->b_transaction != transaction ||
jh->b_jlist == BJ_Metadata);
jbd_unlock_bh_state(bh);
@@ -1380,11 +1387,11 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh)
* of the transaction. This needs to be done
* once a transaction -bzzz
*/
- jh->b_modified = 1;
if (handle->h_buffer_credits <= 0) {
ret = -ENOSPC;
goto out_unlock_bh;
}
+ jh->b_modified = 1;
handle->h_buffer_credits--;
}