linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Liam Howlett <liam.howlett@oracle.com>
To: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"maple-tree@lists.infradead.org" <maple-tree@lists.infradead.org>
Cc: Liam Howlett <liam.howlett@oracle.com>
Subject: [PATCH] userfaultfd: Fix vma iterator conversion.
Date: Tue, 10 Jan 2023 18:43:03 +0000	[thread overview]
Message-ID: <20230110184247.1268710-1-Liam.Howlett@oracle.com> (raw)

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(-)

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;
-- 
2.35.1


             reply	other threads:[~2023-01-10 18:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10 18:43 Liam Howlett [this message]
2023-01-10 22:43 ` Andrew Morton
2023-01-11  1:06   ` Liam Howlett

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=20230110184247.1268710-1-Liam.Howlett@oracle.com \
    --to=liam.howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=maple-tree@lists.infradead.org \
    /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