do_try_to_free_pages is taking both a gfp_mask and an sc->gfp_mask,
sometimes one used and sometimes the other; at present they're always
identical, but such duplication begs for trouble: remove gfp_mask arg.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
---
mm/vmscan.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- 2.6.25-rc5-mm1++/mm/vmscan.c 2008-03-11 20:15:47.000000000 +0000
+++ linux/mm/vmscan.c 2008-03-11 20:21:14.000000000 +0000
@@ -1324,7 +1324,7 @@ static unsigned long shrink_zones(int pr
* allocation attempt will fail.
*/
static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
- gfp_t gfp_mask, struct scan_control *sc)
+ struct scan_control *sc)
{
int priority;
int ret = 0;
@@ -1334,7 +1334,7 @@ static unsigned long do_try_to_free_page
unsigned long lru_pages = 0;
struct zoneref *z;
struct zone *zone;
- enum zone_type high_zoneidx = gfp_zone(gfp_mask);
+ enum zone_type high_zoneidx = gfp_zone(sc->gfp_mask);
if (scan_global_lru(sc))
count_vm_event(ALLOCSTALL);
@@ -1363,7 +1363,7 @@ static unsigned long do_try_to_free_page
* over limit cgroups
*/
if (scan_global_lru(sc)) {
- shrink_slab(sc->nr_scanned, gfp_mask, lru_pages);
+ shrink_slab(sc->nr_scanned, sc->gfp_mask, lru_pages);
if (reclaim_state) {
nr_reclaimed += reclaim_state->reclaimed_slab;
reclaim_state->reclaimed_slab = 0;
@@ -1435,7 +1435,7 @@ unsigned long try_to_free_pages(struct z
.isolate_pages = isolate_pages_global,
};
- return do_try_to_free_pages(zonelist, gfp_mask, &sc);
+ return do_try_to_free_pages(zonelist, &sc);
}
#ifdef CONFIG_CGROUP_MEM_RES_CTLR
@@ -1457,7 +1457,7 @@ unsigned long try_to_free_mem_cgroup_pag
sc.gfp_mask = (gfp_mask & GFP_RECLAIM_MASK) |
(GFP_HIGHUSER_MOVABLE & ~GFP_RECLAIM_MASK);
zonelist = NODE_DATA(numa_node_id())->node_zonelists;
- return do_try_to_free_pages(zonelist, sc.gfp_mask, &sc);
+ return do_try_to_free_pages(zonelist, &sc);
}
#endif
--
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Tejun Heo | [PATCHSET] FUSE: extend FUSE to support more operations |
| Linus Torvalds | Linux 2.6.27-rc8 |
| Linus Torvalds | Linux 2.6.27 |
git: | |
| Ken Pratt | pack operation is thrashing my server |
| Jari Aalto | Re: On Tabs and Spaces |
| Felipe Balbi | Re: git-svnimport |
| Jakub Narebski | Re: VCS comparison table |
| Marcos Laufer | dmesg IBM x3650 OpenBSD 4.3 |
| Kevin Neff | Patching a SSH 'Weakness' |
| F. Caulier | [Perl/locales] Warning about locales |
| OBSD | KSH and Bash problem with long commands |
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Denys Fedoryshchenko | thousands of classes, e1000 TX unit hang |
| Chris Snook | [RFC] introducing the Atheros L2 Fast Ethernet driver |
| Tilman Schmidt | Re: 2.6.25-rc8: FTP transfer errors |
| Treason Uncloaked | 1 hour ago | Linux kernel |
| Shared swap partition | 13 hours ago | Linux general |
| high memory | 2 days ago | Linux kernel |
| semaphore access speed | 2 days ago | Applications and Utilities |
| the kernel how to power off the machine | 2 days ago | Linux kernel |
| Easter Eggs in windows XP | 2 days ago | Windows |
| Root password | 2 days ago | Linux general |
| Where/when DNOTIFY is used? | 2 days ago | Linux kernel |
| How to convert Linux Kernel built-in module into a loadable module | 2 days ago | Linux kernel |
| Linux 2.6.24 and I/O schedulers | 2 days ago | Linux kernel |
