mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
bcachefs: Use crc_is_compressed()
Trivial cleanup. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
c32fc674d4
commit
75f02de43f
1 changed files with 2 additions and 3 deletions
|
@ -675,10 +675,9 @@ static s64 ptr_disk_sectors(s64 sectors, struct extent_ptr_decoded p)
|
|||
{
|
||||
EBUG_ON(sectors < 0);
|
||||
|
||||
return p.crc.compression_type &&
|
||||
p.crc.compression_type != BCH_COMPRESSION_TYPE_incompressible
|
||||
return crc_is_compressed(p.crc)
|
||||
? DIV_ROUND_UP_ULL(sectors * p.crc.compressed_size,
|
||||
p.crc.uncompressed_size)
|
||||
p.crc.uncompressed_size)
|
||||
: sectors;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue