Skip to content

Commit 7528585

Browse files
author
Peter Zijlstra
committed
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 <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: David Hildenbrand <[email protected]>
1 parent 96450ea commit 7528585

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mm/gup.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3351,8 +3351,7 @@ static unsigned long gup_fast(unsigned long start, unsigned long end,
33513351
return 0;
33523352

33533353
if (gup_flags & FOLL_PIN) {
3354-
seq = raw_read_seqcount(&current->mm->write_protect_seq);
3355-
if (seq & 1)
3354+
if (!raw_seqcount_try_begin(&current->mm->write_protect_seq, seq))
33563355
return 0;
33573356
}
33583357

0 commit comments

Comments
 (0)