summaryrefslogtreecommitdiffstats
path: root/fs/quota
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2010-07-19 06:56:17 +0200
committerDave Chinner <david@fromorbit.com>2010-07-19 06:56:17 +0200
commit7f8275d0d660c146de6ee3017e1e2e594c49e820 (patch)
tree884db927118b44102750b5168ee36ef4b8b5cb4e /fs/quota
parentMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kern... (diff)
downloadlinux-7f8275d0d660c146de6ee3017e1e2e594c49e820.tar.xz
linux-7f8275d0d660c146de6ee3017e1e2e594c49e820.zip
mm: add context argument to shrinker callback
The current shrinker implementation requires the registered callback to have global state to work from. This makes it difficult to shrink caches that are not global (e.g. per-filesystem caches). Pass the shrinker structure to the callback so that users can embed the shrinker structure in the context the shrinker needs to operate on and get back to it in the callback via container_of(). Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/quota')
-rw-r--r--fs/quota/dquot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 12c233da1b6b..437d2ca2de97 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -676,7 +676,7 @@ static void prune_dqcache(int count)
* This is called from kswapd when we think we need some
* more memory
*/
-static int shrink_dqcache_memory(int nr, gfp_t gfp_mask)
+static int shrink_dqcache_memory(struct shrinker *shrink, int nr, gfp_t gfp_mask)
{
if (nr) {
spin_lock(&dq_list_lock);