mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
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:
parent
96450ead16
commit
7528585290
1 changed files with 1 additions and 2 deletions
3
mm/gup.c
3
mm/gup.c
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue