[PATCH U-BOOT 3/3] btrfs: btfs_file_read: zero trailing data if no extent was found
Dominique Martinet
asmadeus at codewreck.org
Tue Apr 18 04:43:16 CEST 2023
Qu Wenruo wrote on Tue, Apr 18, 2023 at 10:04:56AM +0800:
> > This is a theorical fix only and hasn't been tested on a file that
> > actually runs this code path.
>
> IIRC there is a memset() at the very beginning of btrfs_file_read() to set
> the whole dest memory to zero.
Right, sorry.
I'll drop this and send a new patch that removes the duplicate memset
(at "The whole file is a hole" comment) instead as seeing multiple
memsets is what made me think it'd be necessary without thinking; that
can be done even if we rework the function a bit in later cleanups...
--
Dominique Martinet | Asmadeus
More information about the U-Boot
mailing list