Re: [PATCH 07/27] ext4: refactor ext4_insert_range()

Jan Kara
2024-12-04T12:02:27Z

On Tue 22-10-24 19:10:38, Zhang Yi wrote:
> From: Zhang Yi <yi.zhang@huawei.com>
>
> Simplify ext4_insert_range() and align its code style with that of
> ext4_collapse_range(). Refactor it by: a) renaming variables, b)
> removing redundant input parameter checks and moving the remaining
> checks under i_rwsem in preparation for future refactoring, and c)
> renaming the three stale error tags.
>
> Signed-off-by: Zhang Yi <yi.zhang@huawei.com>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

Same nit as in the previous patch:

> -out_stop:
> +out_handle:
> ext4_journal_stop(handle);
> -out_mmap:
> +out_invalidate_lock:
> filemap_invalidate_unlock(mapping);
> -out_mutex:
> +out:
> inode_unlock(inode);
> return ret;
> }

I think 'out_inode_lock' is better than plain 'out'.

Honza

--
Jan Kara <jack@suse.com>
SUSE Labs, CR