Re: [PATCH rdma-next v4 2/3] lib/scatterlist: Fix wrong update of orig_nents

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 24, 2021 at 05:25:30PM +0300, Maor Gottlieb wrote:
> @@ -514,11 +531,13 @@ struct scatterlist *sg_alloc_append_table_from_pages(struct sg_table *sgt,
>  		offset = 0;
>  		cur_page = j;
>  	}
> -	sgt->nents += added_nents;
> +	sgt_append->sgt.nents += added_nents;
> +	sgt_append->sgt.orig_nents = sgt_append->sgt.nents;
> +	sgt_append->prv = s;

Why is nents being touched here?

Shouldn't it just be

    sgt_append->sgt.orig_nents += added_nents; 
    sgt_append->prv = s;

?

Let me know I can fix it

Jason



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux