Thread (10 messages) 10 messages, 3 authors, 2021-08-30

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

From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2021-08-24 19:12:54
Also in: dri-devel, intel-gfx, lkml

On Tue, Aug 24, 2021 at 05:25:30PM +0300, Maor Gottlieb wrote:
quoted hunk ↗ jump to hunk
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help