diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index c3feb5310e17..20963b6567ae 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -176,6 +176,9 @@ static int insert_inline_extent(struct btrfs_trans_handle *trans, size_t cur_size = size; unsigned long offset; + ASSERT((compressed_size > 0 && compressed_pages) || + (compressed_size == 0 && !compressed_pages)); + if (compressed_size && compressed_pages) cur_size = compressed_size;