Skip to content

Commit 642fb17

Browse files
Chengming Zhouopsiff
authored andcommitted
mm/slub: remove unused parameter in next_freelist_entry()
The parameter "struct slab *slab" is unused in next_freelist_entry(), so just remove it. Acked-by: Christoph Lameter (Ampere) <cl@linux.com> Reviewed-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com> Signed-off-by: Vlastimil Babka <vbabka@suse.cz> (cherry picked from commit c63349f)
1 parent 0574182 commit 642fb17

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

mm/slub.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,7 +2038,7 @@ static void __init init_freelist_randomization(void)
20382038
}
20392039

20402040
/* Get the next entry on the pre-computed freelist randomized */
2041-
static void *next_freelist_entry(struct kmem_cache *s, struct slab *slab,
2041+
static void *next_freelist_entry(struct kmem_cache *s,
20422042
unsigned long *pos, void *start,
20432043
unsigned long page_limit,
20442044
unsigned long freelist_count)
@@ -2077,13 +2077,12 @@ static bool shuffle_freelist(struct kmem_cache *s, struct slab *slab)
20772077
start = fixup_red_left(s, slab_address(slab));
20782078

20792079
/* First entry is used as the base of the freelist */
2080-
cur = next_freelist_entry(s, slab, &pos, start, page_limit,
2081-
freelist_count);
2080+
cur = next_freelist_entry(s, &pos, start, page_limit, freelist_count);
20822081
cur = setup_object(s, cur);
20832082
slab->freelist = cur;
20842083

20852084
for (idx = 1; idx < slab->objects; idx++) {
2086-
next = next_freelist_entry(s, slab, &pos, start, page_limit,
2085+
next = next_freelist_entry(s, &pos, start, page_limit,
20872086
freelist_count);
20882087
next = setup_object(s, next);
20892088
set_freepointer(s, cur, next);

0 commit comments

Comments
 (0)