public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] missing journal_stop in ext4_da_write_begin error case
@ 2008-07-31 17:23 Eric Sandeen
  2008-07-31 18:09 ` Mingming Cao
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2008-07-31 17:23 UTC (permalink / raw)
  To: ext4 development

ext4_da_write_begin needs to call journal_stop before returning,
if the page allocation fails.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

Index: linux-2.6/fs/ext4/inode.c
===================================================================
--- linux-2.6.orig/fs/ext4/inode.c	2008-07-29 17:18:26.000000000 -0500
+++ linux-2.6/fs/ext4/inode.c	2008-07-31 12:21:03.866229084 -0500
@@ -2280,8 +2280,11 @@ retry:
 	}
 
 	page = __grab_cache_page(mapping, index);
-	if (!page)
-		return -ENOMEM;
+	if (!page) {
+		ext4_journal_stop(handle);
+		ret = -ENOMEM;
+		goto out;
+	}
 	*pagep = page;
 
 	ret = block_write_begin(file, mapping, pos, len, flags, pagep, fsdata,


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-31 18:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-31 17:23 [PATCH] missing journal_stop in ext4_da_write_begin error case Eric Sandeen
2008-07-31 18:09 ` Mingming Cao

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