Re: [PATCH 13/19] dm-bufio: use bio_add_virt_nofail

Mikulas Patocka <[email protected]>
Newsgroups org.kernel.vger.linux-bcache,dev.linux.lists.dm-devel,dev.linux.lists.gfs2,org.kernel.vger.linux-block,org.kernel.vger.linux-btrfs,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-pm,org.kernel.vger.linux-xfs
Message-ID <[email protected]>

On Wed, 30 Apr 2025, Christoph Hellwig wrote:

> Convert the __bio_add_page(..., virt_to_page(), ...) pattern to the
> bio_add_virt_nofail helper implementing it.
> 
> Signed-off-by: Christoph Hellwig <[email protected]>
> Reviewed-by: Damien Le Moal <[email protected]>
> Reviewed-by: Johannes Thumshirn <[email protected]>

Acked-by: Mikulas Patocka <[email protected]>

> ---
>  drivers/md/dm-bufio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c
> index 9c8ed65cd87e..e82cd5dc83ce 100644
> --- a/drivers/md/dm-bufio.c
> +++ b/drivers/md/dm-bufio.c
> @@ -1362,7 +1362,7 @@ static void use_bio(struct dm_buffer *b, enum req_op op, sector_t sector,
>  	ptr = (char *)b->data + offset;
>  	len = n_sectors << SECTOR_SHIFT;
>  
> -	__bio_add_page(bio, virt_to_page(ptr), len, offset_in_page(ptr));
> +	bio_add_virt_nofail(bio, ptr, len);
>  
>  	submit_bio(bio);
>  }
> -- 
> 2.47.2
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.