Patch "erofs: remove the occupied parameter from z_erofs_pagevec_enqueue()" has been added to the 4.19-stable tree

gregkh at linuxfoundation.org gregkh at linuxfoundation.org
Sat Nov 20 01:34:24 AEDT 2021


This is a note to let you know that I've just added the patch titled

    erofs: remove the occupied parameter from z_erofs_pagevec_enqueue()

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     erofs-remove-the-occupied-parameter-from-z_erofs_pagevec_enqueue.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable at vger.kernel.org> know about it.


>From foo at baz Fri Nov 19 03:26:51 PM CET 2021
From: Gao Xiang <hsiangkao at linux.alibaba.com>
Date: Tue, 16 Nov 2021 10:41:52 +0800
Subject: erofs: remove the occupied parameter from z_erofs_pagevec_enqueue()
To: Greg Kroah-Hartman <gregkh at linuxfoundation.org>, stable at vger.kernel.org
Cc: linux-erofs at lists.ozlabs.org, Yue Hu <huyue2 at yulong.com>, Gao Xiang <xiang at kernel.org>, Gao Xiang <hsiangkao at linux.alibaba.com>
Message-ID: <20211116024153.245131-1-hsiangkao at linux.alibaba.com>

From: Yue Hu <huyue2 at yulong.com>

commit 7dea3de7d384f4c8156e8bd93112ba6db1eb276c upstream.

No any behavior to variable occupied in z_erofs_attach_page() which
is only caller to z_erofs_pagevec_enqueue().

Link: https://lore.kernel.org/r/20210419102623.2015-1-zbestahu@gmail.com
Signed-off-by: Yue Hu <huyue2 at yulong.com>
Reviewed-by: Gao Xiang <xiang at kernel.org>
Signed-off-by: Gao Xiang <xiang at kernel.org>
[ Gao Xiang: handle 4.19 codebase conflicts manually. ]
Signed-off-by: Gao Xiang <hsiangkao at linux.alibaba.com>
Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
 drivers/staging/erofs/unzip_pagevec.h |    5 +----
 drivers/staging/erofs/unzip_vle.c     |    4 +---
 2 files changed, 2 insertions(+), 7 deletions(-)

--- a/drivers/staging/erofs/unzip_pagevec.h
+++ b/drivers/staging/erofs/unzip_pagevec.h
@@ -117,10 +117,8 @@ static inline void z_erofs_pagevec_ctor_
 static inline bool
 z_erofs_pagevec_ctor_enqueue(struct z_erofs_pagevec_ctor *ctor,
 			     struct page *page,
-			     enum z_erofs_page_type type,
-			     bool *occupied)
+			     enum z_erofs_page_type type)
 {
-	*occupied = false;
 	if (unlikely(ctor->next == NULL && type))
 		if (ctor->index + 1 == ctor->nr)
 			return false;
@@ -135,7 +133,6 @@ z_erofs_pagevec_ctor_enqueue(struct z_er
 	/* should remind that collector->next never equal to 1, 2 */
 	if (type == (uintptr_t)ctor->next) {
 		ctor->next = page;
-		*occupied = true;
 	}
 
 	ctor->pages[ctor->index++] =
--- a/drivers/staging/erofs/unzip_vle.c
+++ b/drivers/staging/erofs/unzip_vle.c
@@ -234,7 +234,6 @@ static int z_erofs_vle_work_add_page(
 	enum z_erofs_page_type type)
 {
 	int ret;
-	bool occupied;
 
 	/* give priority for the compressed data storage */
 	if (builder->role >= Z_EROFS_VLE_WORK_PRIMARY &&
@@ -242,8 +241,7 @@ static int z_erofs_vle_work_add_page(
 		try_to_reuse_as_compressed_page(builder, page))
 		return 0;
 
-	ret = z_erofs_pagevec_ctor_enqueue(&builder->vector,
-		page, type, &occupied);
+	ret = z_erofs_pagevec_ctor_enqueue(&builder->vector, page, type);
 	builder->work->vcnt += (unsigned)ret;
 
 	return ret ? 0 : -EAGAIN;


Patches currently in stable-queue which might be from hsiangkao at linux.alibaba.com are

queue-4.19/lib-xz-validate-the-value-before-assigning-it-to-an-.patch
queue-4.19/erofs-fix-unsafe-pagevec-reuse-of-hooked-pclusters.patch
queue-4.19/lib-xz-avoid-overlapping-memcpy-with-invalid-input-w.patch
queue-4.19/erofs-remove-the-occupied-parameter-from-z_erofs_pagevec_enqueue.patch


More information about the Linux-erofs mailing list