Filipe Manana 861e5f03ab btrfs: deal with errors when replaying dir entry during log replay
commit e15ac6413745e3def00e663de00aea5a717311c1 upstream.

At replay_one_one(), we are treating any error returned from
btrfs_lookup_dir_item() or from btrfs_lookup_dir_index_item() as meaning
that there is no existing directory entry in the fs/subvolume tree.
This is not correct since we can get errors such as, for example, -EIO
when reading extent buffers while searching the fs/subvolume's btree.

So fix that and return the error to the caller when it is not -ENOENT.

CC: stable@vger.kernel.org # 4.14+
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-20 10:42:03 +02:00
..
2020-11-05 11:07:03 +01:00
2020-04-02 16:34:33 +02:00
2019-08-06 19:05:23 +02:00
2021-07-20 16:17:33 +02:00
2021-09-22 11:45:15 +02:00
2021-07-20 16:17:45 +02:00
2021-06-30 08:48:55 -04:00
2018-12-21 14:13:04 +01:00
2020-03-11 18:02:43 +01:00
2020-04-02 16:34:21 +02:00