diff options
author | Yue Hu <huyue2@yulong.com> | 2021-04-19 12:26:23 +0200 |
---|---|---|
committer | Gao Xiang <xiang@kernel.org> | 2021-06-07 18:40:18 +0200 |
commit | 7dea3de7d384f4c8156e8bd93112ba6db1eb276c (patch) | |
tree | 6afd19787f34fe97011cd841e359d254fdcd91f1 /fs/erofs | |
parent | erofs: fix error return code in erofs_read_superblock() (diff) | |
download | linux-7dea3de7d384f4c8156e8bd93112ba6db1eb276c.tar.xz linux-7dea3de7d384f4c8156e8bd93112ba6db1eb276c.zip |
erofs: remove the occupied parameter from z_erofs_pagevec_enqueue()
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@yulong.com>
Reviewed-by: Gao Xiang <xiang@kernel.org>
Signed-off-by: Gao Xiang <xiang@kernel.org>
Diffstat (limited to 'fs/erofs')
-rw-r--r-- | fs/erofs/zdata.c | 4 | ||||
-rw-r--r-- | fs/erofs/zpvec.h | 5 |
2 files changed, 2 insertions, 7 deletions
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index 78e4b598ecca..275fef484f24 100644 --- a/fs/erofs/zdata.c +++ b/fs/erofs/zdata.c @@ -380,7 +380,6 @@ static int z_erofs_attach_page(struct z_erofs_collector *clt, enum z_erofs_page_type type) { int ret; - bool occupied; /* give priority for inplaceio */ if (clt->mode >= COLLECT_PRIMARY && @@ -388,8 +387,7 @@ static int z_erofs_attach_page(struct z_erofs_collector *clt, z_erofs_try_inplace_io(clt, page)) return 0; - ret = z_erofs_pagevec_enqueue(&clt->vector, - page, type, &occupied); + ret = z_erofs_pagevec_enqueue(&clt->vector, page, type); clt->cl->vcnt += (unsigned int)ret; return ret ? 0 : -EAGAIN; diff --git a/fs/erofs/zpvec.h b/fs/erofs/zpvec.h index 1d67cbd38704..95a620739e6a 100644 --- a/fs/erofs/zpvec.h +++ b/fs/erofs/zpvec.h @@ -107,10 +107,8 @@ static inline void z_erofs_pagevec_ctor_init(struct z_erofs_pagevec_ctor *ctor, static inline bool z_erofs_pagevec_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 (!ctor->next && type) if (ctor->index + 1 == ctor->nr) return false; @@ -125,7 +123,6 @@ static inline bool z_erofs_pagevec_enqueue(struct z_erofs_pagevec_ctor *ctor, /* 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++] = tagptr_fold(erofs_vtptr_t, page, type); return true; |