From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF6AC101CE; Sat, 3 Feb 2024 04:11:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706933504; cv=none; b=pI9bHggJeEnornWl4L2F8J785eOJmo8k6wQ04IUY4tSevFnVE+Yi85guhNfa81shu64DpW7ofxF2vT8e+725DBb4j1GbSWQ4TFGfn4Ibz03FCbLH05ncHjYmlDZpCeHBbe1SP8pkHQM2tuvR4kuZcu70BCTQDEKlpKZHBM5f+HI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706933504; c=relaxed/simple; bh=Ut4d7iSGFWhkV9Uq25zObeVJ2yNa6mlpMcLw7oCD8d8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eOQb1eSMa6tEs2h7oMBjrGlrYou0OaDsb3A6mMBE+l3q/91+s+ZmXrsMl4Zo1xJ8GdWenk6Xkx95WNBpchr9Wwr06hJVU0O7CZTTcu0xRNRRwom9YwfnTHM/8Wh34qxF1fq32I0F5I2i3pYvioILdIhCYgQwNd5ky9RByIjVA2I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LbKBmout; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="LbKBmout" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 850CFC433C7; Sat, 3 Feb 2024 04:11:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1706933504; bh=Ut4d7iSGFWhkV9Uq25zObeVJ2yNa6mlpMcLw7oCD8d8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LbKBmoutqrzYToffndezfQpY8Kvx4jj0ySdmiZUFzkWsNGaoV1tZxAmUOTPEJJZ2U Fm0S++2J0CY0zIXZ7UgX0FqnRHdWahI9m7lbeSuYnJjKt9+1o1olkzYzvCNQ0aHlt8 W2TqJzbw/YsW669GMLqD2JazYBwMIcHrSAeltFQw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Chao Yu , Yue Hu , Gao Xiang , Sasha Levin Subject: [PATCH 6.6 037/322] erofs: fix ztailpacking for subpage compressed blocks Date: Fri, 2 Feb 2024 20:02:14 -0800 Message-ID: <20240203035400.269096975@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203035359.041730947@linuxfoundation.org> References: <20240203035359.041730947@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Gao Xiang [ Upstream commit e5aba911dee5e20fa82efbe13e0af8f38ea459e7 ] `pageofs_in` should be the compressed data offset of the page rather than of the block. Acked-by: Chao Yu Reviewed-by: Yue Hu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20231214161337.753049-1-hsiangkao@linux.alibaba.com Signed-off-by: Sasha Levin --- fs/erofs/zdata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index a33cd6757f98..1c0e6167d8e7 100644 --- a/fs/erofs/zdata.c +++ b/fs/erofs/zdata.c @@ -815,7 +815,6 @@ static int z_erofs_register_pcluster(struct z_erofs_decompress_frontend *fe) if (ztailpacking) { pcl->obj.index = 0; /* which indicates ztailpacking */ - pcl->pageofs_in = erofs_blkoff(fe->inode->i_sb, map->m_pa); pcl->tailpacking_size = map->m_plen; } else { pcl->obj.index = map->m_pa >> PAGE_SHIFT; @@ -893,6 +892,7 @@ static int z_erofs_pcluster_begin(struct z_erofs_decompress_frontend *fe) } get_page(map->buf.page); WRITE_ONCE(fe->pcl->compressed_bvecs[0].page, map->buf.page); + fe->pcl->pageofs_in = map->m_pa & ~PAGE_MASK; fe->mode = Z_EROFS_PCLUSTER_FOLLOWED_NOINPLACE; } /* file-backed inplace I/O pages are traversed in reverse order */ -- 2.43.0