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: David Hildenbrand <david@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: David Hildenbrand <david@redhat.com>
This commit is contained in:
@@ -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(¤t->mm->write_protect_seq);
|
||||
if (seq & 1)
|
||||
if (!raw_seqcount_try_begin(¤t->mm->write_protect_seq, seq))
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user