diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2013-08-28 10:18:15 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2013-09-06 16:47:03 +1000 |
commit | 7307c9498433f84f96573f950c852f36fb2733df (patch) | |
tree | 19984068bb7ae7fa66e3aaa09cde7073cc9e561a | |
parent | fff2d491f1f8c3ae94da86a3a05becb6a925e502 (diff) |
shrinker-convert-remaining-shrinkers-to-count-scan-api-fix
fix warnings
Cc: Dave Chinner <dchinner@redhat.com>
Cc: Glauber Costa <glommer@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | arch/x86/kvm/mmu.c | 10 | ||||
-rw-r--r-- | net/sunrpc/auth.c | 6 |
2 files changed, 9 insertions, 7 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 9e38e6d7352d..dce0df8150df 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -4421,12 +4421,12 @@ void kvm_mmu_invalidate_mmio_sptes(struct kvm *kvm) } } -static long +static unsigned long mmu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) { struct kvm *kvm; int nr_to_scan = sc->nr_to_scan; - long freed = 0; + unsigned long freed = 0; raw_spin_lock(&kvm_lock); @@ -4461,7 +4461,8 @@ mmu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) goto unlock; } - freed += prepare_zap_oldest_mmu_page(kvm, &invalid_list); + if (prepare_zap_oldest_mmu_page(kvm, &invalid_list)) + freed++; kvm_mmu_commit_zap_page(kvm, &invalid_list); unlock: @@ -4482,7 +4483,8 @@ unlock: } -static long mmu_shrink_count(struct shrinker *shrink, struct shrink_control *sc) +static unsigned long +mmu_shrink_count(struct shrinker *shrink, struct shrink_control *sc) { return percpu_counter_read_positive(&kvm_total_used_mmu_pages); } diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index faa9bcb1eba1..5285ead196c0 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c @@ -475,12 +475,12 @@ rpcauth_prune_expired(struct list_head *free, int nr_to_scan) /* * Run memory cache shrinker. */ -static long +static unsigned long rpcauth_cache_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) { LIST_HEAD(free); - long freed; + unsigned long freed; if ((sc->gfp_mask & GFP_KERNEL) != GFP_KERNEL) return SHRINK_STOP; @@ -497,7 +497,7 @@ rpcauth_cache_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) return freed; } -static long +static unsigned long rpcauth_cache_shrink_count(struct shrinker *shrink, struct shrink_control *sc) { |