[PATCH] ext3: journal handling on error path in ext3_journalled_writepage()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Forwarded original patch from Denis Lunev:

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

Signed-Off-By: Denis Lunev <[email protected]>

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



[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux