Skip to contentSkip to conversation

erofs: remove the pagepool parameter from z_erofs_shifted_transform()

PATCH In review Yue Hu 2 participants 2 messages Aug 31, 2021 – Sep 3, 2021 EROFS file system

lore
Share & tools
lore

Yue Hu

author reviewer
#0 lore raw

PATCH 1/1 erofs: remove the pagepool parameter from z_erofs_shifted_transform()

From: Yue Hu <[email protected]>

We don't use the pagepool for plain format, remove it.

---
 fs/erofs/decompressor.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
fs/erofs/decompressor.c +2 -3
index a5bc4b1..8f50a36 100644
@@ -360,8 +360,7 @@ static int z_erofs_decompress_generic(struct z_erofs_decompress_req *rq,
 	return ret;
 }
 
-static int z_erofs_shifted_transform(const struct z_erofs_decompress_req *rq,
-				     struct list_head *pagepool)
+static int z_erofs_shifted_transform(const struct z_erofs_decompress_req *rq)
 {
 	const unsigned int nrpages_out =
 		PAGE_ALIGN(rq->pageofs_out + rq->outputsize) >> PAGE_SHIFT;
@@ -403,6 +402,6 @@ int z_erofs_decompress(struct z_erofs_decompress_req *rq,
 		       struct list_head *pagepool)
 {
 	if (rq->alg == Z_EROFS_COMPRESSION_SHIFTED)
-		return z_erofs_shifted_transform(rq, pagepool);
+		return z_erofs_shifted_transform(rq);
 	return z_erofs_decompress_generic(rq, pagepool);
 }
Signature · 1 line
1.9.1
#1 lore raw

Hi Yue,

Quoted 3 lines · Yue Hu

From: Yue Hu <[email protected]>

We don't use the pagepool for plain format, remove it.

In my LZMA patchset, I'll rearrange such interface to make LZMA integration easier:
https://git.kernel.org/pub/scm/linux/kernel/git/xiang/linux.git/commit/?h=erofs/lzma&id=3fab9044a4fe9358e95e16780831640caf3de10b

This cleanup patch does no harm to that one, yet I think it has little real impact (especially applying the patch above)... So I'd like to hear Chao's suggestion about this as well. I'm fine in either ways.

(p.s. we are in 5.15 merge window, I will set up a new dev branch after
-rc1 is out.)

Thanks,
Gao Xiang

Quoted 30 lines
---
 fs/erofs/decompressor.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
fs/erofs/decompressor.c +2 -3
index a5bc4b1..8f50a36 100644
@@ -360,8 +360,7 @@ static int z_erofs_decompress_generic(struct z_erofs_decompress_req *rq,
 	return ret;
 }
 
-static int z_erofs_shifted_transform(const struct z_erofs_decompress_req *rq,
-				     struct list_head *pagepool)
+static int z_erofs_shifted_transform(const struct z_erofs_decompress_req *rq)
 {
 	const unsigned int nrpages_out =
 		PAGE_ALIGN(rq->pageofs_out + rq->outputsize) >> PAGE_SHIFT;
@@ -403,6 +402,6 @@ int z_erofs_decompress(struct z_erofs_decompress_req *rq,
 		       struct list_head *pagepool)
 {
 	if (rq->alg == Z_EROFS_COMPRESSION_SHIFTED)
-		return z_erofs_shifted_transform(rq, pagepool);
+		return z_erofs_shifted_transform(rq);
 	return z_erofs_decompress_generic(rq, pagepool);
 }
Signature · 1 line
1.9.1