]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
mm: add context argument to shrinker callback
authorDave Chinner <dchinner@redhat.com>
Mon, 19 Jul 2010 04:56:17 +0000 (14:56 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 19 Jul 2010 04:56:17 +0000 (14:56 +1000)
commit7f8275d0d660c146de6ee3017e1e2e594c49e820
tree884db927118b44102750b5168ee36ef4b8b5cb4e
parentd0c6f6258478e1dba532bf7c28e2cd6e1047d3a4
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>
18 files changed:
arch/x86/kvm/mmu.c
drivers/gpu/drm/i915/i915_gem.c
fs/dcache.c
fs/gfs2/glock.c
fs/gfs2/quota.c
fs/gfs2/quota.h
fs/inode.c
fs/mbcache.c
fs/nfs/dir.c
fs/nfs/internal.h
fs/quota/dquot.c
fs/ubifs/shrinker.c
fs/ubifs/ubifs.h
fs/xfs/linux-2.6/xfs_buf.c
fs/xfs/linux-2.6/xfs_sync.c
fs/xfs/quota/xfs_qm.c
include/linux/mm.h
mm/vmscan.c