lkml.org 
[lkml]   [2005]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] ext3: journal handling on error path in ext3_journalled_writepage()
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
--- ./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;
}

\
 
 \ /
  Last update: 2005-11-07 14:37    [W:0.039 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site