Patchwork ext4: let ext4_page_mkwrite stop started handle in failure

login
register
mail settings
Submitter Yongqiang Yang
Date Sept. 15, 2011, 2:56 a.m.
Message ID <1316055390-14476-1-git-send-email-xiaoqiangnk@gmail.com>
Download mbox | patch
Permalink /patch/114733/
State Accepted
Headers show

Comments

Yongqiang Yang - Sept. 15, 2011, 2:56 a.m.
The started journal handle should be stopped in failure case.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
 fs/ext4/inode.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Jan Kara - Sept. 15, 2011, 12:28 p.m.
On Thu 15-09-11 10:56:30, Yongqiang Yang wrote:
> The started journal handle should be stopped in failure case.
> 
> Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
  Correct.
  Acked-by: Jan Kara <jack@suse.cz>

									Honza
> ---
>  fs/ext4/inode.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index bcf5257..c8529be 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -4624,6 +4624,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);
> -- 
> 1.7.5.1
>
Theodore Ts'o - Oct. 26, 2011, 9:01 a.m.
On Thu, Sep 15, 2011 at 10:56:30AM +0800, Yongqiang Yang wrote:
> The started journal handle should be stopped in failure case.
> 
> Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>

Thanks, applied.

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index bcf5257..c8529be 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -4624,6 +4624,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);