Commit 75285852 authored by Peter Zijlstra's avatar Peter Zijlstra
Browse files

mm/gup: Use raw_seqcount_try_begin()



David pointed out that gup_fast() does exactly what the new
raw_seqcount_try_begin() does -- use it.

Suggested-by: default avatarDavid Hildenbrand <david@redhat.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
parent 96450ead
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -3351,8 +3351,7 @@ static unsigned long gup_fast(unsigned long start, unsigned long end,
		return 0;

	if (gup_flags & FOLL_PIN) {
		seq = raw_read_seqcount(&current->mm->write_protect_seq);
		if (seq & 1)
		if (!raw_seqcount_try_begin(&current->mm->write_protect_seq, seq))
			return 0;
	}