diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index 70b2ae1ef2810e1a8fea2a557bfa5f5e7a395190..6bd8005e3d34434d95fac5037d79d4042af34678 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c @@ -248,8 +248,12 @@ static void journal_submit_data_buffers(journal_t *journal, bufs = 0; goto write_out_data; } - } - else { + } else if (!locked && buffer_locked(bh)) { + __jbd2_journal_file_buffer(jh, commit_transaction, + BJ_Locked); + jbd_unlock_bh_state(bh); + put_bh(bh); + } else { BUFFER_TRACE(bh, "writeout complete: unfile"); __jbd2_journal_unfile_buffer(jh); jbd_unlock_bh_state(bh);