linux/fs/btrfs
Marcos Paulo de Souza 736f60bd48 btrfs: tree-log: check btrfs_lookup_data_extent return value
[ Upstream commit 3736127a3aa805602b7a2ad60ec9cfce68065fbb ]

Function btrfs_lookup_data_extent calls btrfs_search_slot to verify if
the EXTENT_ITEM exists in the extent tree. btrfs_search_slot can return
values bellow zero if an error happened.

Function replay_one_extent currently checks if the search found
something (0 returned) and increments the reference, and if not, it
seems to evaluate as 'not found'.

Fix the condition by checking if the value was bellow zero and return
early.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-22 12:26:34 +02:00
..
tests
acl.c
async-thread.c
async-thread.h
backref.c
backref.h
block-group.c btrfs: delete duplicated words + other fixes in comments 2021-08-08 09:04:07 +02:00
block-group.h
block-rsv.c
block-rsv.h
btrfs_inode.h btrfs: fix race between marking inode needs to be logged and log syncing 2021-09-03 10:08:15 +02:00
check-integrity.c
check-integrity.h
compression.c btrfs: mark compressed range uptodate only if all bio succeed 2021-08-04 12:27:37 +02:00
compression.h
ctree.c btrfs: delete duplicated words + other fixes in comments 2021-08-08 09:04:07 +02:00
ctree.h btrfs: fix lockdep splat when enabling and disabling qgroups 2021-08-15 13:08:05 +02:00
delalloc-space.c btrfs: make btrfs_qgroup_reserve_data take btrfs_inode 2021-08-15 13:08:04 +02:00
delalloc-space.h
delayed-inode.c btrfs: don't flush from btrfs_delayed_inode_reserve_metadata 2021-08-15 13:08:06 +02:00
delayed-inode.h
delayed-ref.c
delayed-ref.h
dev-replace.c
dev-replace.h
dir-item.c
disk-io.c btrfs: qgroup: remove ASYNC_COMMIT mechanism in favor of reserve retry-after-EDQUOT 2021-08-15 13:08:05 +02:00
disk-io.h
export.c
export.h
extent_io.c btrfs: delete duplicated words + other fixes in comments 2021-08-08 09:04:07 +02:00
extent_io.h
extent_map.c
extent_map.h
extent-tree.c btrfs: check for missing device in btrfs_trim_fs 2021-07-28 13:31:00 +02:00
file-item.c btrfs: fix error handling in btrfs_del_csums 2021-06-10 13:37:13 +02:00
file.c btrfs: fix race between marking inode needs to be logged and log syncing 2021-09-03 10:08:15 +02:00
free-space-cache.c btrfs: delete duplicated words + other fixes in comments 2021-08-08 09:04:07 +02:00
free-space-cache.h
free-space-tree.c
free-space-tree.h
inode-item.c
inode-map.c
inode-map.h
inode.c btrfs: wake up async_delalloc_pages waiters after submit 2021-09-22 12:26:19 +02:00
ioctl.c
Kconfig btrfs: disable build on platforms having page size 256K 2021-07-14 16:53:14 +02:00
locking.c
locking.h
lzo.c
Makefile
misc.h
ordered-data.c
ordered-data.h
orphan.c
print-tree.c
print-tree.h
props.c
props.h
qgroup.c btrfs: export and rename qgroup_reserve_meta 2021-08-15 13:08:06 +02:00
qgroup.h btrfs: export and rename qgroup_reserve_meta 2021-08-15 13:08:06 +02:00
raid56.c
raid56.h
rcu-string.h
reada.c
ref-verify.c
ref-verify.h
relocation.c
root-tree.c
scrub.c
send.c btrfs: send: fix invalid path for unlink operations after parent orphanization 2021-07-14 16:53:02 +02:00
send.h
space-info.c
space-info.h
struct-funcs.c
super.c
sysfs.c
sysfs.h
transaction.c btrfs: qgroup: remove ASYNC_COMMIT mechanism in favor of reserve retry-after-EDQUOT 2021-08-15 13:08:05 +02:00
transaction.h btrfs: fix race between marking inode needs to be logged and log syncing 2021-09-03 10:08:15 +02:00
tree-checker.c btrfs: tree-checker: do not error out if extent ref hash doesn't match 2021-06-10 13:37:01 +02:00
tree-checker.h
tree-defrag.c
tree-log.c btrfs: tree-log: check btrfs_lookup_data_extent return value 2021-09-22 12:26:34 +02:00
tree-log.h btrfs: do not commit logs and transactions during link and rename operations 2021-08-08 09:04:07 +02:00
ulist.c
ulist.h
uuid-tree.c
volumes.c btrfs: reset replace target device to allocation state on close 2021-09-22 12:26:19 +02:00
volumes.h
xattr.c
xattr.h
zlib.c
zstd.c