Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5634802pxb; Mon, 28 Mar 2022 15:16:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5Ihb6I6JNgWIh2iGxa5ccv2THLmww5c8hrqxHdvgrdZmcK9y3JKvGmx1nrcIHyLEKIljM X-Received: by 2002:a17:90b:3908:b0:1c7:7a14:2083 with SMTP id ob8-20020a17090b390800b001c77a142083mr1271873pjb.230.1648505792410; Mon, 28 Mar 2022 15:16:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648505792; cv=none; d=google.com; s=arc-20160816; b=H+CoTZf8JA/ISG5JNSPv/ajR1sSTroGFjRn3JiXtBjqY7YZOwGzpHy3vHse3DBigo/ kzKWLzXhyP4Ag5DJP80X42v96V8/K1jSW8VaeJj7p9o7l68h6sLskoIQ573gAdbxtSM0 EYmDK/4errMYjb7qO8DO1jQde/vMtqRsKGaWYneWKElKKuNCIhMzsXc5cP0u1hAZO0Su 11SCfOGkWnJ2E0J45OdIPKSQvPuDmRZw4yJqJvtFfBiiRSjjuTyP2+sxUFRgqYlbelcF 6qdTnFM3yf+/+MIJk7UuU0dAJ6KiW/ytxGnC5+Ga0XLfB8LRTOf+bXDbxeWJfjKNXTEh kfZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5qsDZTVpj9vVSAjKbMfzRGgg8UNlHevrwvmi1ShmNoc=; b=XtrfwkQLD/YOuOO710x5uu4rVLWZa5oCp2QgtLMESwDvM/a9Y5jHPdAEqw+XcQN+TX VHCGGnSr+lu/apwT+Z0WHxI1GLTeTbFogfPn/bwGswqmebcCBZYAjZPT5c7TLCsBy4sd bM0sNQv95Xw6jvaFYtUOYz9WWoMuL21Sr9aKmMX4Cw+VWVgPBNpJ8NjypbTKPFJYO/zb pTRbM3NyRnqCUHz/NAqW3F+d8kVsDFEdqXNzbpziBfAyrHwojlzyM4ZozGMX6WrKdcNM cz3YeYwk/aA7Dmbp4ExsiPGGVfjLG19fTNnhENXftW41+VxCtdwWVVptS+4VDfAnuwiJ uJWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="A/Rm6wyX"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id e26-20020a63545a000000b003816043ee51si14397892pgm.70.2022.03.28.15.16.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 15:16:32 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="A/Rm6wyX"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CB77317C404; Mon, 28 Mar 2022 14:34:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245756AbiC1To6 (ORCPT + 99 others); Mon, 28 Mar 2022 15:44:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343565AbiC1ToJ (ORCPT ); Mon, 28 Mar 2022 15:44:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DF2366FB5; Mon, 28 Mar 2022 12:42:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9E0DC612AC; Mon, 28 Mar 2022 19:42:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 224F4C36AEC; Mon, 28 Mar 2022 19:42:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648496543; bh=Tep2vIuVDQsBDq9li1VXsakPXRUUageVRqxJj3lG7YE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A/Rm6wyXvgfBuVNlW81O7uV8swyGA2AbyNnaNrvpPBGd2w94n4Gre4TfsnLpJ7EIh RpqYaTxo7YsB9MJWRTOwYglWYW/T1gxsD0mHkEMZ5e27AVCMHFJKlL0qZRJ1eYJTjQ btQlxlbNDufeKtgfrOHoUR8nWFDPX9f2Smrc/6FXNgfDlowH840h44EA3N4gDVJ1tD O6TDl2/qnjYrzsg+IplZRB6Um/L1N2JNwjiN+cSIwEgB7E6SnWrHxp2U2JhKSTTUe8 E3KOT3Aw0pLEJ+I8zwKYiguvTzD5gEVmf4NdxqC4TdE6urJx//1NAyMs/zPA54cKsW /mup7EAuAhCQw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Chao Yu , Chao Yu , Jaegeuk Kim , Sasha Levin , yuchao0@huawei.com, linux-f2fs-devel@lists.sourceforge.net Subject: [PATCH AUTOSEL 5.17 19/21] f2fs: compress: fix to print raw data size in error path of lz4 decompression Date: Mon, 28 Mar 2022 15:41:54 -0400 Message-Id: <20220328194157.1585642-19-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220328194157.1585642-1-sashal@kernel.org> References: <20220328194157.1585642-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chao Yu [ Upstream commit d284af43f703760e261b1601378a0c13a19d5f1f ] In lz4_decompress_pages(), if size of decompressed data is not equal to expected one, we should print the size rather than size of target buffer for decompressed data, fix it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- fs/f2fs/compress.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index d0c3aeba5945..3b162506b269 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -314,10 +314,9 @@ static int lz4_decompress_pages(struct decompress_io_ctx *dic) } if (ret != PAGE_SIZE << dic->log_cluster_size) { - printk_ratelimited("%sF2FS-fs (%s): lz4 invalid rlen:%zu, " + printk_ratelimited("%sF2FS-fs (%s): lz4 invalid ret:%d, " "expected:%lu\n", KERN_ERR, - F2FS_I_SB(dic->inode)->sb->s_id, - dic->rlen, + F2FS_I_SB(dic->inode)->sb->s_id, ret, PAGE_SIZE << dic->log_cluster_size); return -EIO; } -- 2.34.1