diff options
-rw-r--r-- | fs/jbd2/transaction.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index e0c0bc275924..a6917125f215 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c | |||
@@ -1151,7 +1151,10 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh) | |||
1151 | * once a transaction -bzzz | 1151 | * once a transaction -bzzz |
1152 | */ | 1152 | */ |
1153 | jh->b_modified = 1; | 1153 | jh->b_modified = 1; |
1154 | J_ASSERT_JH(jh, handle->h_buffer_credits > 0); | 1154 | if (handle->h_buffer_credits <= 0) { |
1155 | ret = -ENOSPC; | ||
1156 | goto out_unlock_bh; | ||
1157 | } | ||
1155 | handle->h_buffer_credits--; | 1158 | handle->h_buffer_credits--; |
1156 | } | 1159 | } |
1157 | 1160 | ||
@@ -1234,7 +1237,6 @@ out_unlock_bh: | |||
1234 | jbd2_journal_put_journal_head(jh); | 1237 | jbd2_journal_put_journal_head(jh); |
1235 | out: | 1238 | out: |
1236 | JBUFFER_TRACE(jh, "exit"); | 1239 | JBUFFER_TRACE(jh, "exit"); |
1237 | WARN_ON(ret); /* All errors are bugs, so dump the stack */ | ||
1238 | return ret; | 1240 | return ret; |
1239 | } | 1241 | } |
1240 | 1242 | ||