public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext3: journal handling on error path in ext3_journalled_writepage()
@ 2005-11-07 13:41 Kirill Korotaev
  0 siblings, 0 replies; only message in thread
From: Kirill Korotaev @ 2005-11-07 13:41 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton, ext3-users, sct, den

[-- Attachment #1: Type: text/plain, Size: 192 bytes --]

Forwarded original patch from Denis Lunev:

This patch fixes lost referrence on ext3 current handle in
ext3_journalled_writepage()

Signed-Off-By: Denis Lunev <den@sw.ru>

P.S. against 2.6.14

[-- Attachment #2: diff-ms-ext3handle-20051031 --]
[-- Type: text/plain, Size: 673 bytes --]

--- ./fs/ext3/inode.c.msext3	2005-10-23 23:36:27.000000000 +0400
+++ ./fs/ext3/inode.c	2005-10-31 17:03:34.000000000 +0300
@@ -1375,8 +1375,11 @@ static int ext3_journalled_writepage(str
 		ClearPageChecked(page);
 		ret = block_prepare_write(page, 0, PAGE_CACHE_SIZE,
 					ext3_get_block);
-		if (ret != 0)
-			goto out_unlock;
+		if (ret != 0) {
+			ext3_journal_stop(handle);
+			unlock_page(page);
+			return ret;
+		}
 		ret = walk_page_buffers(handle, page_buffers(page), 0,
 			PAGE_CACHE_SIZE, NULL, do_journal_get_write_access);
 
@@ -1402,7 +1405,6 @@ out:
 
 no_write:
 	redirty_page_for_writepage(wbc, page);
-out_unlock:
 	unlock_page(page);
 	goto out;
 }



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-11-07 13:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-07 13:41 [PATCH] ext3: journal handling on error path in ext3_journalled_writepage() Kirill Korotaev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox