Skip to content

Commit 6c1ad56

Browse files
Yue Hugregkh
authored andcommitted
erofs: remove the occupied parameter from z_erofs_pagevec_enqueue()
commit 7dea3de 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@yulong.com> Reviewed-by: Gao Xiang <xiang@kernel.org> Signed-off-by: Gao Xiang <xiang@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 5bf5f46 commit 6c1ad56

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

fs/erofs/zdata.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,16 +282,14 @@ static int z_erofs_attach_page(struct z_erofs_collector *clt,
282282
enum z_erofs_page_type type)
283283
{
284284
int ret;
285-
bool occupied;
286285

287286
/* give priority for inplaceio */
288287
if (clt->mode >= COLLECT_PRIMARY &&
289288
type == Z_EROFS_PAGE_TYPE_EXCLUSIVE &&
290289
z_erofs_try_inplace_io(clt, page))
291290
return 0;
292291

293-
ret = z_erofs_pagevec_enqueue(&clt->vector,
294-
page, type, &occupied);
292+
ret = z_erofs_pagevec_enqueue(&clt->vector, page, type);
295293
clt->cl->vcnt += (unsigned int)ret;
296294

297295
return ret ? 0 : -EAGAIN;

fs/erofs/zpvec.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,8 @@ static inline void z_erofs_pagevec_ctor_init(struct z_erofs_pagevec_ctor *ctor,
107107

108108
static inline bool z_erofs_pagevec_enqueue(struct z_erofs_pagevec_ctor *ctor,
109109
struct page *page,
110-
enum z_erofs_page_type type,
111-
bool *occupied)
110+
enum z_erofs_page_type type)
112111
{
113-
*occupied = false;
114112
if (!ctor->next && type)
115113
if (ctor->index + 1 == ctor->nr)
116114
return false;
@@ -125,7 +123,6 @@ static inline bool z_erofs_pagevec_enqueue(struct z_erofs_pagevec_ctor *ctor,
125123
/* should remind that collector->next never equal to 1, 2 */
126124
if (type == (uintptr_t)ctor->next) {
127125
ctor->next = page;
128-
*occupied = true;
129126
}
130127
ctor->pages[ctor->index++] = tagptr_fold(erofs_vtptr_t, page, type);
131128
return true;

0 commit comments

Comments
 (0)