Fix bug identified by Badari Pulavarty <pbadari@us.ibm.com>
Local variable `handle' will become stale if ext3_direct_io_get_blocks()
closes off the current transaction and starts a new one. This causes a BUG in
journal_stop().
So reacquire the handle from *current after performing the I/O.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
offset, nr_segs,
ext3_direct_io_get_blocks, NULL);
+ /*
+ * Reacquire the handle: ext3_direct_io_get_block() can restart the
+ * transaction
+ */
+ handle = journal_current_handle();
+
out_stop:
if (handle) {
int err;