Re: [PATCH v2 28/34] nilfs2: Convert nilfs_gccache_submit_read_data to bh_submit()

Jan Kara <[email protected]> Sat, 30 May 2026 13:56:41 +0200
Newsgroups org.kernel.vger.linux-nilfs,org.kernel.vger.linux-fsdevel
Message-ID <bmdqf2ffghn7eda5icbhfv77hiwokal3ol7m5mpyaasxeh57ou@ztbry5hhr43h>
On Thu 28-05-26 18:31:41, Matthew Wilcox (Oracle) wrote:
> Avoid an extra indirect function call and changing the buffer refcount
> by using bh_submit() instead of submit_bh().
> 
> Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
> Reviewed-by: Viacheslav Dubeyko <[email protected]>
> Acked-by: Ryusuke Konishi <[email protected]>
> Cc: [email protected]

Looks good. Feel free to add:

Reviewed-by: Jan Kara <[email protected]>

								Honza

> ---
>  fs/nilfs2/gcinode.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/fs/nilfs2/gcinode.c b/fs/nilfs2/gcinode.c
> index 62d4c1b787e9..85379ac23ae2 100644
> --- a/fs/nilfs2/gcinode.c
> +++ b/fs/nilfs2/gcinode.c
> @@ -83,9 +83,7 @@ int nilfs_gccache_submit_read_data(struct inode *inode, sector_t blkoff,
>  	if (!buffer_mapped(bh))
>  		set_buffer_mapped(bh);
>  	bh->b_blocknr = pbn;
> -	bh->b_end_io = end_buffer_read_sync;
> -	get_bh(bh);
> -	submit_bh(REQ_OP_READ, bh);
> +	bh_submit(bh, REQ_OP_READ, bh_end_read);
>  	if (vbn)
>  		bh->b_blocknr = vbn;
>   out:
> -- 
> 2.47.3
> 
-- 
Jan Kara <[email protected]>
SUSE Labs, CR