Message ID | 20140106223943.310249326@linuxfoundation.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
--- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c @@ -1126,7 +1126,10 @@ int jbd2_journal_dirty_metadata(handle_t * once a transaction -bzzz */ jh->b_modified = 1; - J_ASSERT_JH(jh, handle->h_buffer_credits > 0); + if (handle->h_buffer_credits <= 0) { + ret = -ENOSPC; + goto out_unlock_bh; + } handle->h_buffer_credits--; } @@ -1209,7 +1212,6 @@ out_unlock_bh: jbd2_journal_put_journal_head(jh); out: JBUFFER_TRACE(jh, "exit"); - WARN_ON(ret); /* All errors are bugs, so dump the stack */ return ret; }