[v4,hmm,06/12] mm/hmm: Do not use list*_rcu() for hmm->ranges

Submitted by Jason Gunthorpe on June 24, 2019, 9:01 p.m.


Message ID 20190624210110.5098-7-jgg@ziepe.ca
State New
Headers show
Series "Series without cover letter" ( rev: 2 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Jason Gunthorpe June 24, 2019, 9:01 p.m.
From: Jason Gunthorpe <jgg@mellanox.com>

This list is always read and written while holding hmm->lock so there is
no need for the confusing _rcu annotations.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Reviewed-by: Jérôme Glisse <jglisse@redhat.com>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Acked-by: Souptick Joarder <jrdr.linux@gmail.com>
Reviewed-by: Ralph Campbell <rcampbell@nvidia.com>
Reviewed-by: Ira Weiny <iweiny@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Philip Yang <Philip.Yang@amd.com>
 mm/hmm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/mm/hmm.c b/mm/hmm.c
index 0423f4ca3a7e09..73c8af4827fe87 100644
--- a/mm/hmm.c
+++ b/mm/hmm.c
@@ -912,7 +912,7 @@  int hmm_range_register(struct hmm_range *range,
 	range->hmm = hmm;
-	list_add_rcu(&range->list, &hmm->ranges);
+	list_add(&range->list, &hmm->ranges);
 	 * If there are any concurrent notifiers we have to wait for them for
@@ -942,7 +942,7 @@  void hmm_range_unregister(struct hmm_range *range)
-	list_del_rcu(&range->list);
+	list_del(&range->list);
 	/* Drop reference taken by hmm_range_register() */