Skip to content

Commit 1ad539b

Browse files
dvhartLinus Torvalds
authored andcommitted
[PATCH] vm: try_to_free_pages unused argument
try_to_free_pages accepts a third argument, order, but hasn't used it since before 2.6.0. The following patch removes the argument and updates all the calls to try_to_free_pages. Signed-off-by: Darren Hart <dvhltc@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent cbe37d0 commit 1ad539b

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

fs/buffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ static void free_more_memory(void)
528528
for_each_pgdat(pgdat) {
529529
zones = pgdat->node_zonelists[GFP_NOFS&GFP_ZONEMASK].zones;
530530
if (*zones)
531-
try_to_free_pages(zones, GFP_NOFS, 0);
531+
try_to_free_pages(zones, GFP_NOFS);
532532
}
533533
}
534534

include/linux/swap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ extern int rotate_reclaimable_page(struct page *page);
172172
extern void swap_setup(void);
173173

174174
/* linux/mm/vmscan.c */
175-
extern int try_to_free_pages(struct zone **, unsigned int, unsigned int);
175+
extern int try_to_free_pages(struct zone **, unsigned int);
176176
extern int zone_reclaim(struct zone *, unsigned int, unsigned int);
177177
extern int shrink_all_memory(int);
178178
extern int vm_swappiness;

mm/page_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ __alloc_pages(unsigned int __nocast gfp_mask, unsigned int order,
859859
reclaim_state.reclaimed_slab = 0;
860860
p->reclaim_state = &reclaim_state;
861861

862-
did_some_progress = try_to_free_pages(zones, gfp_mask, order);
862+
did_some_progress = try_to_free_pages(zones, gfp_mask);
863863

864864
p->reclaim_state = NULL;
865865
p->flags &= ~PF_MEMALLOC;

mm/vmscan.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -919,8 +919,7 @@ shrink_caches(struct zone **zones, struct scan_control *sc)
919919
* holds filesystem locks which prevent writeout this might not work, and the
920920
* allocation attempt will fail.
921921
*/
922-
int try_to_free_pages(struct zone **zones,
923-
unsigned int gfp_mask, unsigned int order)
922+
int try_to_free_pages(struct zone **zones, unsigned int gfp_mask)
924923
{
925924
int priority;
926925
int ret = 0;

0 commit comments

Comments
 (0)