On 24.02.20 г. 14:56 ч., Nikolay Borisov wrote:
> We could return ret uninitlaized in case of success. Before the code was
> returning 0 explicitly in case of success but now it will be a random value from
> the stack. That's due to ret being set only in error conditions.
>
> Signed-off-by: Nikolay Borisov <nborisov@xxxxxxxx>
This ideally has to be folded in:
5a03d907a555 ("btrfs: remove buffer_heads form super block mirror
integrity checking")
> ---
> fs/btrfs/check-integrity.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
> index 23dd65e1c5e3..85b27e9742c8 100644
> --- a/fs/btrfs/check-integrity.c
> +++ b/fs/btrfs/check-integrity.c
> @@ -766,7 +766,7 @@ static int btrfsic_process_superblock_dev_mirror(
> struct block_device *const superblock_bdev = device->bdev;
> struct page *page;
> struct address_space *mapping = superblock_bdev->bd_inode->i_mapping;
> - int ret;
> + int ret = 0;
>
> /* super block bytenr is always the unmapped device bytenr */
> dev_bytenr = btrfs_sb_offset(superblock_mirror_num);
> --
> 2.17.1
>