All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kirill Korotaev <dev@sw.ru>
To: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
	ext3-users@redhat.com, sct@redhat.com, den@sw.ru
Subject: [PATCH] ext3: journal handling on error path in ext3_journalled_writepage()
Date: Mon, 07 Nov 2005 16:41:40 +0300	[thread overview]
Message-ID: <436F5994.2070703@sw.ru> (raw)

[-- 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;
 }



                 reply	other threads:[~2005-11-07 13:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=436F5994.2070703@sw.ru \
    --to=dev@sw.ru \
    --cc=akpm@osdl.org \
    --cc=den@sw.ru \
    --cc=ext3-users@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sct@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.