Commit 63f253bb authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] jbd: start_this_handle() return value fix

From: Alex Tomas <alex@clusterfs.com>

start_this_handle() returns 0 always.  because of this journal_start() may
return handle with h_transaction = NULL
parent 4631b75f
......@@ -85,7 +85,7 @@ static int start_this_handle(journal_t *journal, handle_t *handle)
int needed;
int nblocks = handle->h_buffer_credits;
transaction_t *new_transaction = NULL;
int ret;
int ret = 0;
if (nblocks > journal->j_max_transaction_buffers) {
printk(KERN_ERR "JBD: %s wants too many credits (%d > %d)\n",
......@@ -231,7 +231,7 @@ static int start_this_handle(journal_t *journal, handle_t *handle)
out:
if (new_transaction)
kfree(new_transaction);
return 0;
return ret;
}
/* Allocate a new handle. This should probably be in a slab... */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment