userfaultfd: Fix vma iterator conversion.

Message ID 20230110184247.1268710-1-Liam.Howlett@oracle.com
State New
Headers
Series userfaultfd: Fix vma iterator conversion. |

Commit Message

Liam R. Howlett Jan. 10, 2023, 6:43 p.m. UTC
  An extra vma_iter_set() was added to one of the loops over the VMAs.
Remove this set as it is suboptimal and unnecessary.

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
---

This is an mm-unstable hash
Fixes: c6fc05242a09 ("userfaultfd: use vma iterator")

Please squash this patch.


 fs/userfaultfd.c | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Andrew Morton Jan. 10, 2023, 10:43 p.m. UTC | #1
On Tue, 10 Jan 2023 18:43:03 +0000 Liam Howlett <liam.howlett@oracle.com> wrote:

> Please squash this patch.

It throws a reject.

This series is getting pretty mauled.  I think I'll drop it and ask for a v2, please.
  
Liam R. Howlett Jan. 11, 2023, 1:06 a.m. UTC | #2
* Andrew Morton <akpm@linux-foundation.org> [230110 17:43]:
> On Tue, 10 Jan 2023 18:43:03 +0000 Liam Howlett <liam.howlett@oracle.com> wrote:
> 
> > Please squash this patch.
> 
> It throws a reject.
> 
> This series is getting pretty mauled.  I think I'll drop it and ask for a v2, please.

Sounds good.  I'll send out a v3 after squashing & cleaning things up.

Regards,
Liam
  

Patch

diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c
index e60f86d6b91c..55f3af6689b8 100644
--- a/fs/userfaultfd.c
+++ b/fs/userfaultfd.c
@@ -1620,7 +1620,6 @@  static int userfaultfd_unregister(struct userfaultfd_ctx *ctx,
 				break;
 		}
 		if (vma->vm_end > end) {
-			vma_iter_set(&vmi, vma->vm_end);
 			ret = split_vma(&vmi, vma, end, 0);
 			if (ret)
 				break;