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

Qu Wenruo
2022-04-05T05:09:07Z

On 2022/4/5 12:58, 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.
>

Please drop this patch, as discussed with Filipe, the memset() value
0x01 could be a poison value to distinguish from plain 0x00.

Furthermore, we are not sure if we even want to zeroing out/poison the
content.

Thanks,
Qu