]> err.no Git - linux-2.6/commitdiff
[PATCH] ext3: journal handling on error path in ext3_journalled_writepage()
authorDenis Lunev <den@sw.ru>
Mon, 14 Nov 2005 00:07:17 +0000 (16:07 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 14 Nov 2005 02:14:15 +0000 (18:14 -0800)
This patch fixes lost referrence on ext3 current handle in
ext3_journalled_writepage().

Signed-Off-By: Denis Lunev <den@sw.ru>
Cc: Kirill Korotaev <dev@sw.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/ext3/inode.c

index 5d9b00e2883720a8b0e2cc48a72d05a65d696a7b..8824e84f8a56a58b8f0aee6ac99cbc9307038565 100644 (file)
@@ -1384,8 +1384,10 @@ static int ext3_journalled_writepage(struct page *page,
                ClearPageChecked(page);
                ret = block_prepare_write(page, 0, PAGE_CACHE_SIZE,
                                        ext3_get_block);
-               if (ret != 0)
+               if (ret != 0) {
+                       ext3_journal_stop(handle);
                        goto out_unlock;
+               }
                ret = walk_page_buffers(handle, page_buffers(page), 0,
                        PAGE_CACHE_SIZE, NULL, do_journal_get_write_access);