btrfs: fix uninitialized variable warning in get_inode_gen
authorJosef Bacik <josef@toxicpanda.com>
Fri, 16 Dec 2022 20:15:53 +0000 (15:15 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Feb 2023 16:50:33 +0000 (17:50 +0100)
commitab199013592abb3499b8316a800a39ab61e6719f
tree211698eae21e599f1aa9bca922f890641dc24310
parent0e47b25cafb29338722f68e8c5a260aaf18ce92c
btrfs: fix uninitialized variable warning in get_inode_gen

Anybody that calls get_inode_gen() can have an uninitialized gen if
there's an error.  This isn't a big deal because all the users just exit
if they get an error, however it makes -Wmaybe-uninitialized complain,
so fix this up to always initialize the passed in gen, this quiets all
of the uninitialized warnings in send.c.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/send.c