blob: cf3064f98cc9f9853433cd1e026adbe7369b3dae [file] [log] [blame]
From stable-bounces@linux.kernel.org Sun Jul 15 23:37:47 2007
From: Jan Kara <jack@suse.cz>
Date: Sun, 15 Jul 2007 23:37:18 -0700
Subject: jbd commit: fix transaction dropping
To: torvalds@linux-foundation.org
Cc: dev@openvz.org, jack@suse.cz, cebbert@redhat.com, akpm@linux-foundation.org, linux-ext4@vger.kernel.org, stable@kernel.org
Message-ID: <200707160637.l6G6bIOv013980@imap1.linux-foundation.org>
From: Jan Kara <jack@suse.cz>
We have to check that also the second checkpoint list is non-empty before
dropping the transaction.
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Chuck Ebbert <cebbert@redhat.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/jbd/commit.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/fs/jbd/commit.c
+++ b/fs/jbd/commit.c
@@ -887,7 +887,8 @@ restart_loop:
journal->j_committing_transaction = NULL;
spin_unlock(&journal->j_state_lock);
- if (commit_transaction->t_checkpoint_list == NULL) {
+ if (commit_transaction->t_checkpoint_list == NULL &&
+ commit_transaction->t_checkpoint_io_list == NULL) {
__journal_drop_transaction(journal, commit_transaction);
} else {
if (journal->j_checkpoint_transactions == NULL) {