From: Jason Gunthorpe <jgg@nvidia.com>
To: Maor Gottlieb <maorg@nvidia.com>
Cc: dledford@redhat.com, hch@infradead.org, leonro@nvidia.com,
aelior@marvell.com, daniel@ffwll.ch, airlied@linux.ie,
dennis.dalessandro@cornelisnetworks.com,
dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com,
linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
mkalderon@marvell.com, mike.marciniszyn@cornelisnetworks.com,
mustafa.ismail@intel.com, rodrigo.vivi@intel.com,
sroland@vmware.com, shiraz.saleem@intel.com, tzimmermann@suse.de,
linux-graphics-maintainer@vmware.com, liweihang@huawei.com,
liangwenpeng@huawei.com, yishaih@nvidia.com, zackr@vmware.com,
zyjzyj2000@gmail.com
Subject: Re: [PATCH rdma-next v4 2/3] lib/scatterlist: Fix wrong update of orig_nents
Date: Tue, 24 Aug 2021 16:12:48 -0300 [thread overview]
Message-ID: <20210824191248.GY1721383@nvidia.com> (raw)
In-Reply-To: <20210824142531.3877007-3-maorg@nvidia.com>
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
next prev parent reply other threads:[~2021-08-24 19:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-24 14:25 [PATCH rdma-next v4 0/3] SG fix together with update to RDMA umem Maor Gottlieb
2021-08-24 14:25 ` [PATCH rdma-next v4 1/3] lib/scatterlist: Provide a dedicated function to support table append Maor Gottlieb
2021-08-24 14:25 ` [PATCH rdma-next v4 2/3] lib/scatterlist: Fix wrong update of orig_nents Maor Gottlieb
2021-08-24 19:12 ` Jason Gunthorpe [this message]
2021-08-25 4:59 ` Maor Gottlieb
2021-08-25 13:09 ` Jason Gunthorpe
2021-08-24 14:25 ` [PATCH rdma-next v4 3/3] RDMA: Use the sg_table directly and remove the opencoded version from umem Maor Gottlieb
2021-08-30 8:21 ` [PATCH rdma-next v4 0/3] SG fix together with update to RDMA umem Leon Romanovsky
2021-08-30 13:31 ` Jason Gunthorpe
2021-08-30 13:42 ` Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210824191248.GY1721383@nvidia.com \
--to=jgg@nvidia.com \
--cc=aelior@marvell.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dennis.dalessandro@cornelisnetworks.com \
--cc=dledford@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hch@infradead.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=leonro@nvidia.com \
--cc=liangwenpeng@huawei.com \
--cc=linux-graphics-maintainer@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=liweihang@huawei.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=maorg@nvidia.com \
--cc=mike.marciniszyn@cornelisnetworks.com \
--cc=mkalderon@marvell.com \
--cc=mripard@kernel.org \
--cc=mustafa.ismail@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=shiraz.saleem@intel.com \
--cc=sroland@vmware.com \
--cc=tzimmermann@suse.de \
--cc=yishaih@nvidia.com \
--cc=zackr@vmware.com \
--cc=zyjzyj2000@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).