aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_autoload.c
diff options
context:
space:
mode:
authorNikolay Borisov <[email protected]>2022-07-14 13:48:10 +0300
committerDavid Sterba <[email protected]>2022-07-25 17:45:42 +0200
commitfc8b235fdc090a000e164b49c3384802ea44c636 (patch)
tree1caf46ea2a0cb4e79f81ef979d26116072e41cfb /tools/testing/selftests/bpf/progs/test_autoload.c
parent0d8869fb6b6f82d5647ddaa6652e159d0f81d008 (diff)
btrfs: simplify error handling in btrfs_lookup_dentry
In btrfs_lookup_dentry releasing the reference of the sub_root and the running orphan cleanup should only happen if the dentry found actually represents a subvolume. This can only be true in the 'else' branch as otherwise either fixup_tree_root_location returned an ENOENT error, in which case sub_root wouldn't have been changed or if we got a different errno this means btrfs_get_fs_root couldn't have executed successfully again meaning sub_root will equal to root. So simplify all the branches by moving the code into the 'else'. Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Nikolay Borisov <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions