* [PATCH] mm: remove mmu_notifier_get
@ 2020-09-16 11:27 Christoph Hellwig
2020-09-16 12:33 ` David Hildenbrand
2020-09-16 15:53 ` Jason Gunthorpe
0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2020-09-16 11:27 UTC (permalink / raw)
To: jgg, akpm; +Cc: linux-mm
Remove the unused mmu_notifier_get inline function.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
include/linux/mmu_notifier.h | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h
index b8200782dedeb9..acd1cc41f25d81 100644
--- a/include/linux/mmu_notifier.h
+++ b/include/linux/mmu_notifier.h
@@ -279,16 +279,6 @@ static inline int mm_has_notifiers(struct mm_struct *mm)
struct mmu_notifier *mmu_notifier_get_locked(const struct mmu_notifier_ops *ops,
struct mm_struct *mm);
-static inline struct mmu_notifier *
-mmu_notifier_get(const struct mmu_notifier_ops *ops, struct mm_struct *mm)
-{
- struct mmu_notifier *ret;
-
- mmap_write_lock(mm);
- ret = mmu_notifier_get_locked(ops, mm);
- mmap_write_unlock(mm);
- return ret;
-}
void mmu_notifier_put(struct mmu_notifier *subscription);
void mmu_notifier_synchronize(void);
--
2.28.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] mm: remove mmu_notifier_get
2020-09-16 11:27 [PATCH] mm: remove mmu_notifier_get Christoph Hellwig
@ 2020-09-16 12:33 ` David Hildenbrand
2020-09-16 15:53 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: David Hildenbrand @ 2020-09-16 12:33 UTC (permalink / raw)
To: Christoph Hellwig, jgg, akpm; +Cc: linux-mm
On 16.09.20 13:27, Christoph Hellwig wrote:
> Remove the unused mmu_notifier_get inline function.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> include/linux/mmu_notifier.h | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h
> index b8200782dedeb9..acd1cc41f25d81 100644
> --- a/include/linux/mmu_notifier.h
> +++ b/include/linux/mmu_notifier.h
> @@ -279,16 +279,6 @@ static inline int mm_has_notifiers(struct mm_struct *mm)
>
> struct mmu_notifier *mmu_notifier_get_locked(const struct mmu_notifier_ops *ops,
> struct mm_struct *mm);
> -static inline struct mmu_notifier *
> -mmu_notifier_get(const struct mmu_notifier_ops *ops, struct mm_struct *mm)
> -{
> - struct mmu_notifier *ret;
> -
> - mmap_write_lock(mm);
> - ret = mmu_notifier_get_locked(ops, mm);
> - mmap_write_unlock(mm);
> - return ret;
> -}
> void mmu_notifier_put(struct mmu_notifier *subscription);
> void mmu_notifier_synchronize(void);
The doc of mmu_notifier_get_locked() has a reference to this function.
"Each call to mmu_notifier_get() must be paired with a call to
mmu_notifier_put()." - that should have been mmu_notifier_get_locked(),
maybe fix that up right away.
--
Thanks,
David / dhildenb
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] mm: remove mmu_notifier_get
2020-09-16 11:27 [PATCH] mm: remove mmu_notifier_get Christoph Hellwig
2020-09-16 12:33 ` David Hildenbrand
@ 2020-09-16 15:53 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2020-09-16 15:53 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: akpm, linux-mm
On Wed, Sep 16, 2020 at 01:27:24PM +0200, Christoph Hellwig wrote:
> Remove the unused mmu_notifier_get inline function.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> include/linux/mmu_notifier.h | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h
> index b8200782dedeb9..acd1cc41f25d81 100644
> +++ b/include/linux/mmu_notifier.h
> @@ -279,16 +279,6 @@ static inline int mm_has_notifiers(struct mm_struct *mm)
>
> struct mmu_notifier *mmu_notifier_get_locked(const struct mmu_notifier_ops *ops,
> struct mm_struct *mm);
> -static inline struct mmu_notifier *
> -mmu_notifier_get(const struct mmu_notifier_ops *ops, struct mm_struct *mm)
> -{
> - struct mmu_notifier *ret;
> -
> - mmap_write_lock(mm);
> - ret = mmu_notifier_get_locked(ops, mm);
> - mmap_write_unlock(mm);
> - return ret;
> -}
> void mmu_notifier_put(struct mmu_notifier *subscription);
> void mmu_notifier_synchronize(void);
Looks like I missed this from
Fixes: f25a546e6529 ("RDMA/odp: Use mmu_interval_notifier_insert()")
Though, I have a vauge recollection that some SVA IOMMU patches posted
wanted to use this too? They can bring it back if it makes sense
Looks like David is right about the comment, but aside from that:
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
v2 should go through Andrew's tree
Thanks,
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-16 15:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 11:27 [PATCH] mm: remove mmu_notifier_get Christoph Hellwig
2020-09-16 12:33 ` David Hildenbrand
2020-09-16 15:53 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox