ext4: let ext4_page_mkwrite stop started handle in failure
Yongqiang Yang [Wed, 26 Oct 2011 09:00:19 +0000 (05:00 -0400)]
commit fcbb5515825f1bb20b7a6f75ec48bee61416f879 upstream.

The started journal handle should be stopped in failure case.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

fs/ext4/inode.c

index 986e238..89c47f4 100644 (file)
@@ -4416,6 +4416,7 @@ retry_alloc:
                          PAGE_CACHE_SIZE, NULL, do_journal_get_write_access)) {
                        unlock_page(page);
                        ret = VM_FAULT_SIGBUS;
+                       ext4_journal_stop(handle);
                        goto out;
                }
                ext4_set_inode_state(inode, EXT4_STATE_JDATA);