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

Johannes Thumshirn
2022-03-25T10:58:48Z

On 25/03/2022 11:49, Qu Wenruo wrote:
>
>
> On 2022/3/25 18:10, Johannes Thumshirn wrote:
>> On 25/03/2022 10:38, Qu Wenruo wrote:
>>> The original code is not really setting the memory to 0x00 but 0x01.
>>>
>>> To prevent such problem from happening, use memzero_page() instead.
>>>
>>> Since we're here, also make @len const since it's just sectorsize.
>>
>> Any idea why we're setting it to 1? It's been this way since 07157aacb1ec
>> ("Btrfs: Add file data csums back in via hooks in the extent map code")
>> which landed in v2.6.29. So basically since the dawn of time.
>
> No idea at all, maybe just a typo.

Anyways,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>