aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorYing Han <yinghan@google.com>2011-05-24 20:12:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-25 11:39:25 -0400
commita09ed5e00084448453c8bada4dcd31e5fbfc2f21 (patch)
tree493f5f2a93efb080cdcc28e793cbcfc7999e66eb /fs
parent7b1de5868b124d8f399d8791ed30a9b679d64d4d (diff)
vmscan: change shrink_slab() interfaces by passing shrink_control
Consolidate the existing parameters to shrink_slab() into a new shrink_control struct. This is needed later to pass the same struct to shrinkers. Signed-off-by: Ying Han <yinghan@google.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Minchan Kim <minchan.kim@gmail.com> Acked-by: Pavel Emelyanov <xemul@openvz.org> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Mel Gorman <mel@csn.ul.ie> Acked-by: Rik van Riel <riel@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Hugh Dickins <hughd@google.com> Cc: Dave Hansen <dave@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/drop_caches.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/drop_caches.c b/fs/drop_caches.c
index 98b77c89494c..440999c24353 100644
--- a/fs/drop_caches.c
+++ b/fs/drop_caches.c
@@ -40,9 +40,13 @@ static void drop_pagecache_sb(struct super_block *sb, void *unused)
40static void drop_slab(void) 40static void drop_slab(void)
41{ 41{
42 int nr_objects; 42 int nr_objects;
43 struct shrink_control shrink = {
44 .gfp_mask = GFP_KERNEL,
45 .nr_scanned = 1000,
46 };
43 47
44 do { 48 do {
45 nr_objects = shrink_slab(1000, GFP_KERNEL, 1000); 49 nr_objects = shrink_slab(&shrink, 1000);
46 } while (nr_objects > 10); 50 } while (nr_objects > 10);
47} 51}
48 52