Message ID | 1389623099-18783-65-git-send-email-luis.henriques@canonical.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index 81203d1..edfb1ec 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c @@ -1126,7 +1126,10 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh) * 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; }