lkml.org 
[lkml]   [2022]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v5 5/6] dax: fix missing writeprotect the pte entry
On Tue, Mar 22, 2022 at 4:37 PM Christoph Hellwig <hch@infradead.org> wrote:
>
> > +static void dax_entry_mkclean(struct address_space *mapping, unsigned long pfn,
> > + unsigned long npfn, pgoff_t start)
> > {
> > struct vm_area_struct *vma;
> > + pgoff_t end = start + npfn - 1;
> >
> > i_mmap_lock_read(mapping);
> > + vma_interval_tree_foreach(vma, &mapping->i_mmap, start, end) {
> > + pfn_mkclean_range(pfn, npfn, start, vma);
> > cond_resched();
> > }
> > i_mmap_unlock_read(mapping);
>
>
> Is there any point in even keeping this helper vs just open coding it
> in the only caller below?

Good point. I'll fold dax_entry_mkclean() into the caller.

>
> Otherwise looks good:
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>

Thanks.

\
 
 \ /
  Last update: 2022-03-22 09:49    [W:0.641 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site