From 63f253bbb2ae077dfa6bdc2af30b03a4ead6605f Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 19 Jan 2004 05:08:44 -0800 Subject: [PATCH] [PATCH] jbd: start_this_handle() return value fix From: Alex Tomas start_this_handle() returns 0 always. because of this journal_start() may return handle with h_transaction = NULL --- fs/jbd/transaction.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c index ba957c1fb3dcd..73ef79d97fd06 100644 --- a/fs/jbd/transaction.c +++ b/fs/jbd/transaction.c @@ -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 @@ repeat_locked: out: if (new_transaction) kfree(new_transaction); - return 0; + return ret; } /* Allocate a new handle. This should probably be in a slab... */ -- 2.53.0