Skip to content

Commit 7dea3de

Browse files
Yue Huhsiangkao
authored andcommitted
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>
1 parent 0508c1a commit 7dea3de

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
@@ -380,16 +380,14 @@ static int z_erofs_attach_page(struct z_erofs_collector *clt,
380380
enum z_erofs_page_type type)
381381
{
382382
int ret;
383-
bool occupied;
384383

385384
/* give priority for inplaceio */
386385
if (clt->mode >= COLLECT_PRIMARY &&
387386
type == Z_EROFS_PAGE_TYPE_EXCLUSIVE &&
388387
z_erofs_try_inplace_io(clt, page))
389388
return 0;
390389

391-
ret = z_erofs_pagevec_enqueue(&clt->vector,
392-
page, type, &occupied);
390+
ret = z_erofs_pagevec_enqueue(&clt->vector, page, type);
393391
clt->cl->vcnt += (unsigned int)ret;
394392

395393
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)