diff options
author | Filipe Manana <fdmanana@suse.com> | 2022-11-21 10:23:24 +0000 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-12-05 18:00:59 +0100 |
commit | 3eb423442483d454937cdc8853e58c399ffe5514 (patch) | |
tree | dfadb5d97014389be53c73b101b34a069dcdcf3a /tools/testing/selftests/bpf/prog_tests/prog_array_init.c | |
parent | 3a8d1db341b93e65fa76051ab833b3640842b6eb (diff) |
btrfs: remove outdated logic from overwrite_item() and add assertion
As of commit 193df6245704 ("btrfs: search for last logged dir index if
it's not cached in the inode"), the overwrite_item() function is always
called for a root that is from a fs/subvolume tree. In other words, now
it's only used during log replay to modify a fs/subvolume tree. Therefore
we can remove the logic that checks if we are dealing with a log tree at
overwrite_item().
So remove that logic, replacing it with an assertion and document that if
we ever need to support a log root there, we will need to clone the leaf
from the fs/subvolume tree and then release it before modifying the log
tree, which is needed to avoid a potential deadlock, similar to the one
recently fixed by a patch with the subject:
"btrfs: do not modify log tree while holding a leaf from fs tree locked"
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions