Files
linux-stable-mirror/fs
Filipe Manana 52f8a4fdc2 btrfs: fix missing error handling when searching for inode refs during log replay
[ Upstream commit 6561a40cec ]

During log replay, at __add_inode_ref(), when we are searching for inode
ref keys we totally ignore if btrfs_search_slot() returns an error. This
may make a log replay succeed when there was an actual error and leave
some metadata inconsistency in a subvolume tree. Fix this by checking if
an error was returned from btrfs_search_slot() and if so, return it to
the caller.

Fixes: e02119d5a7 ("Btrfs: Add a write ahead tree log to optimize synchronous operations")
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-07-17 18:27:46 +02:00
..
2024-10-22 15:39:24 +02:00
2024-02-23 08:42:14 +01:00
2025-04-10 14:30:49 +02:00
2024-03-01 13:16:43 +01:00
2023-09-23 11:01:09 +02:00
2023-01-14 10:16:27 +01:00