Re: [PATCH] btrfs: replace a wrong memset() with memzero_page()

David Sterba
2022-04-05T21:15:11Z

On Mon, Apr 04, 2022 at 09:58:26PM -0700, Christoph Hellwig wrote:
> On Fri, Mar 25, 2022 at 09:38:16AM -0700, Christoph Hellwig wrote:
> > > - memset(kaddr + pgoff, 1, len);
> > > + memzero_page(page, pgoff, len);
> > > flush_dcache_page(page);
> >
> > memzero_page already takes care of the flush_dcache_page.
>
> David, you've picked this up with the stay flush_dcache_page left in
> place. Plase try to fix it up instead of spreading the weird cargo cult
> flush_dcache_page calls.

Good point, flush_dcache_page is in memzero_page so it should have been
removed within the patch. I've grepped and there are still 14 calls,
some of them next to memzero_page so that'll go away too.