]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
btrfs: fix lost error handling when replaying directory deletes
authorFilipe Manana <fdmanana@suse.com>
Thu, 14 Oct 2021 16:26:04 +0000 (17:26 +0100)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 7 Dec 2021 06:32:30 +0000 (07:32 +0100)
commitfaf8c7febb247fa486f7344028e4ae617b2deb4d
treef2f20745c8abe6fce1dcb61f587f1ee831993798
parent0010bbabd5cfc3c873069e6664400945a9d82b24
btrfs: fix lost error handling when replaying directory deletes

BugLink: https://bugs.launchpad.net/bugs/1951822
commit 10adb1152d957a4d570ad630f93a88bb961616c1 upstream.

At replay_dir_deletes(), if find_dir_range() returns an error we break out
of the main while loop and then assign a value of 0 (success) to the 'ret'
variable, resulting in completely ignoring that an error happened. Fix
that by jumping to the 'out' label when find_dir_range() returns an error
(negative value).

CC: stable@vger.kernel.org # 4.4+
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
fs/btrfs/tree-log.c