From: Denis Lunev Date: Mon, 14 Nov 2005 00:07:17 +0000 (-0800) Subject: [PATCH] ext3: journal handling on error path in ext3_journalled_writepage() X-Git-Tag: v2.6.15-rc2~165 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab4eb43ce759559d7b15c5dde4a1562f202539f6;p=linux-2.6 [PATCH] ext3: journal handling on error path in ext3_journalled_writepage() This patch fixes lost referrence on ext3 current handle in ext3_journalled_writepage(). Signed-Off-By: Denis Lunev Cc: Kirill Korotaev Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index 5d9b00e288..8824e84f8a 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c @@ -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);