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

David Sterba
2022-03-28T19:02:13Z

On Mon, Mar 28, 2022 at 08:51:21PM +0200, David Sterba wrote:
> On Fri, Mar 25, 2022 at 05:37:59PM +0800, 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.
>
> This should at least mention we think that setting it to 0 is right, as
> you call it wrong but give no hint why it's thought to be wrong.
>
> > Since we're here, also make @len const since it's just sectorsize.
>
> Please don't do that, adding const is fine when the line gets touched
> but otherwise adding it to an unrelated fix is not what I want to
> encourage.

Applied with that hunk deleted and with an updated changelog.