From: Chengming Zhou zhouchengming@bytedance.com
mainline inclusion from mainline-v6.9-rc1 commit c63349fc4a2d10f5d1b5ee805cb639ee88fd6e4a category: performance bugzilla: https://gitee.com/openeuler/kernel/issues/I9CSFJ CVE: NA
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i...
--------------------------------
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 Signed-off-by: ZhangPeng zhangpeng362@huawei.com --- mm/slub.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c index bd6eb0bbdcd3..ee3e32cdb7fd 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1941,7 +1941,7 @@ static void __init init_freelist_randomization(void) }
/* Get the next entry on the pre-computed freelist randomized */ -static void *next_freelist_entry(struct kmem_cache *s, struct slab *slab, +static void *next_freelist_entry(struct kmem_cache *s, unsigned long *pos, void *start, unsigned long page_limit, unsigned long freelist_count) @@ -1980,13 +1980,12 @@ static bool shuffle_freelist(struct kmem_cache *s, struct slab *slab) start = fixup_red_left(s, slab_address(slab));
/* First entry is used as the base of the freelist */ - cur = next_freelist_entry(s, slab, &pos, start, page_limit, - freelist_count); + cur = next_freelist_entry(s, &pos, start, page_limit, freelist_count); cur = setup_object(s, cur); slab->freelist = cur;
for (idx = 1; idx < slab->objects; idx++) { - next = next_freelist_entry(s, slab, &pos, start, page_limit, + next = next_freelist_entry(s, &pos, start, page_limit, freelist_count); next = setup_object(s, next); set_freepointer(s, cur, next);