Re: [PATCH 4/7] ext4: Introduce a new helper function ext4_generic_write_inline_data()

From: Jan Kara
Date: Mon Jan 06 2025 - 10:36:31 EST


On Fri 20-12-24 23:16:22, Julian Sun wrote:
> A new function, ext4_generic_write_inline_data(), is introduced
> to provide a generic implementation of the common logic found in
> ext4_da_write_inline_data_begin() and ext4_try_to_write_inline_data().
>
> This function will be utilized in the subsequent two patches.
>
> Signed-off-by: Julian Sun <sunjunchao2870@xxxxxxxxx>

Looks good, just one style nit below. Feel free to add:

Reviewed-by: Jan Kara <jack@xxxxxxx>

...
> + *foliop = folio;
> + up_read(&EXT4_I(inode)->xattr_sem);
> + brelse(iloc.bh);
> + return 1;

Here I'd suggest empty line for better readability.

> +out_release_folio:
> + up_read(&EXT4_I(inode)->xattr_sem);
> + folio_unlock(folio);
> + folio_put(folio);
> +out_stop_journal:
> + ext4_journal_stop(handle);
> +out_release_bh:
> + brelse(iloc.bh);
> + return ret;
> +}
> +

Honza
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR