mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 07:23:14 +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
@ -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 New Issue
Block a user