jbd: ordered data integrity fix
commitddb18c699bb0ecf636113acee2ad25b201d2bb12
authorHidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Sun, 19 Oct 2008 03:27:58 +0000 (18 20:27 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 5 Dec 2008 18:55:47 +0000 (5 10:55 -0800)
treee11e602d020161ea963e6f5eea7d832f72f6f312
parenta78f8afe3491080e7fce1d1fa59207a4a558bc7d
jbd: ordered data integrity fix

commit 960a22ae60c8a723bd17da3b929fe0bcea6d007e upstream.

In ordered mode, if a file data buffer being dirtied exists in the
committing transaction, we write the buffer to the disk, move it from the
committing transaction to the running transaction, then dirty it.  But we
don't have to remove the buffer from the committing transaction when the
buffer couldn't be written out, otherwise it would miss the error and the
committing transaction would not abort.

This patch adds an error check before removing the buffer from the
committing transaction.

Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/jbd/transaction.c