summaryrefslogtreecommitdiffstats
path: root/mm/hmm.c
diff options
context:
space:
mode:
authorJason Gunthorpe2019-05-23 16:43:43 +0200
committerJason Gunthorpe2019-06-18 16:57:45 +0200
commit157816f3775f5c4df2c68ef0e3a100ada974aa2e (patch)
tree57cde98b0db06e0eee0b9704df6c175dee960cbc /mm/hmm.c
parentmm/hmm: Remove duplicate condition test before wait_event_timeout (diff)
downloadkernel-qcow2-linux-157816f3775f5c4df2c68ef0e3a100ada974aa2e.tar.gz
kernel-qcow2-linux-157816f3775f5c4df2c68ef0e3a100ada974aa2e.tar.xz
kernel-qcow2-linux-157816f3775f5c4df2c68ef0e3a100ada974aa2e.zip
mm/hmm: Do not use list*_rcu() for hmm->ranges
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>
Diffstat (limited to 'mm/hmm.c')
-rw-r--r--mm/hmm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/hmm.c b/mm/hmm.c
index 0423f4ca3a7e..73c8af4827fe 100644
--- a/mm/hmm.c
+++ b/mm/hmm.c
@@ -912,7 +912,7 @@ int hmm_range_register(struct hmm_range *range,
range->hmm = hmm;
kref_get(&hmm->kref);
- 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)
return;
mutex_lock(&hmm->lock);
- list_del_rcu(&range->list);
+ list_del(&range->list);
mutex_unlock(&hmm->lock);
/* Drop reference taken by hmm_range_register() */