diff options
author | David Sterba <dsterba@suse.com> | 2018-01-10 17:13:07 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-01-22 18:08:21 +0300 |
commit | e2683fc9d219430f5b78889b50cde7f40efeba7b (patch) | |
tree | b8de1fa06788f0154a84dbf919a5b3f7e8421fd5 /fs/btrfs/locking.h | |
parent | 6670d4c2d9b7d352cbf90cd18c516bb6444acf34 (diff) | |
download | linux-e2683fc9d219430f5b78889b50cde7f40efeba7b.tar.xz |
btrfs: tree-check: reduce stack consumption in check_dir_item
I've noticed that the updated item checker stack consumption increased
dramatically in 542f5385e20cf97447 ("btrfs: tree-checker: Add checker
for dir item")
tree-checker.c:check_leaf +552 (176 -> 728)
The array is 255 bytes long, dynamic allocation would slow down the
sanity checks so it's more reasonable to keep it on-stack. Moving the
variable to the scope of use reduces the stack usage again
tree-checker.c:check_leaf -264 (728 -> 464)
Reviewed-by: Josef Bacik <jbacik@fb.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/locking.h')
0 files changed, 0 insertions, 0 deletions