[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140721195102.GC19942@quack.suse.cz>
Date: Mon, 21 Jul 2014 21:51:02 +0200
From: Jan Kara <jack@...e.cz>
To: Dmitry Monakhov <dmonakhov@...nvz.org>
Cc: linux-ext4@...r.kernel.org, tytso@....edu
Subject: Re: [PATCH 3/3] ext4: fix incorrect locking in move_extent_per_page
On Mon 21-07-14 19:04:49, Dmitry Monakhov wrote:
> If we have to copy data we must drop i_data_sem because of
> get_blocks() will be called inside mext_page_mkuptodate(), but later we must
> reacquire it again because we are about to change extent's tree
>
> Signed-off-by: Dmitry Monakhov <dmonakhov@...nvz.org>
Looks good. You can add:
Reviewed-by: Jan Kara <jack@...e.cz>
Honza
> ---
> fs/ext4/move_extent.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
> index 2484c7e..671a74b 100644
> --- a/fs/ext4/move_extent.c
> +++ b/fs/ext4/move_extent.c
> @@ -1013,10 +1013,11 @@ data_copy:
> *err = -EBUSY;
> goto unlock_pages;
> }
> -
> + ext4_double_down_write_data_sem(orig_inode, donor_inode);
> replaced_count = mext_replace_branches(handle, orig_inode, donor_inode,
> orig_blk_offset,
> block_len_in_page, err);
> + ext4_double_up_write_data_sem(orig_inode, donor_inode);
> if (*err) {
> if (replaced_count) {
> block_len_in_page = replaced_count;
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists