diff options
author | Nikolay Borisov <nborisov@suse.com> | 2018-09-13 15:05:06 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-10-31 18:24:13 +0100 |
commit | a9cddf632fc16ba935d540cbace10c70acb1cd3b (patch) | |
tree | 05df6f0692d4a1f88d1e142431d5a528f98c6f13 /check | |
parent | 2daecf07f3f0459d62f513d4fc1f130e0f4578da (diff) |
btrfs-progs: check: lowmem: Refactor extent len test in check_file_extent_inline
Instead of having another top-level if which checks for
'extent_num_bytes != item_inline_len' only if we are !compressed, just
move the 'if' inside the 'else' branch of the first top-level if, since
it has already checked for !compressed or not. No functional changes.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'check')
-rw-r--r-- | check/mode-lowmem.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c index 0677332d..2c1ec85f 100644 --- a/check/mode-lowmem.c +++ b/check/mode-lowmem.c @@ -1853,20 +1853,20 @@ static int check_file_extent_inline(struct btrfs_root *root, extent_num_bytes, max_inline_extent_size); err |= FILE_EXTENT_ERROR; } - } - if (!compressed && extent_num_bytes != item_inline_len) { - error( + if (extent_num_bytes != item_inline_len) { + error( "root %llu EXTENT_DATA[%llu %llu] wrong inline size, have: %llu, expected: %u", root->objectid, fkey.objectid, fkey.offset, extent_num_bytes, item_inline_len); - if (repair) { - ret = repair_inline_ram_bytes(root, path, - &extent_num_bytes); - if (ret) + if (repair) { + ret = repair_inline_ram_bytes(root, path, + &extent_num_bytes); + if (ret) + err |= FILE_EXTENT_ERROR; + } else { err |= FILE_EXTENT_ERROR; - } else { - err |= FILE_EXTENT_ERROR; + } } } *end += extent_num_bytes; |