On Fri, Nov 06, 2020 at 06:17:16PM +0100, Ahmed S. Darwish wrote: > Hi Jason, > > On Fri, Nov 06, 2020 at 11:55:14AM -0400, Jason Gunthorpe wrote: > ... > > + if (gup_flags & FOLL_PIN) { > > + seq = raw_read_seqcount(¤t->mm->write_protect_seq); > > + if (seq & 1) > > + return 0; > > + } > > + > ... > > + if (gup_flags & FOLL_PIN) { > > + if (read_seqcount_t_retry(¤t->mm->write_protect_seq, > > + seq)) { > > + unpin_user_pages(pages, nr_pinned); > > + return 0; > > + } > > + } > > From seqlock.h: > > /** > * raw_read_seqcount() - read the raw seqcount_t counter value > * ... > * Return: count to be passed to read_seqcount_retry() > */ > #define raw_read_seqcount(s) > > Please avoid using the internal API (read_seqcount_*t*_retry) and just > use read_seqcount_retry() as the documentation suggests. Oh, yes I didn't notice this one in all the discussion that spawned from the first thread. Thanks Jason